devops

package
v0.0.0-...-36df0cc Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LastBuild             = "lastBuild"
	LastCompletedBuild    = "lastCompletedBuild"
	LastFailedBuild       = "lastFailedBuild"
	LastStableBuild       = "lastStableBuild"
	LastSuccessfulBuild   = "lastSuccessfulBuild"
	LastUnstableBuild     = "lastUnstableBuild"
	LastUnsuccessfulBuild = "lastUnsuccessfulBuild"
	FirstBuild            = "firstBuild"
)
View Source
const (
	// StatePaused indicates a node or a step was paused, for example it's waiting for an iput
	StatePaused = "PAUSED"
)

Variables

This section is empty.

Functions

func GetDevOpsStatusCode

func GetDevOpsStatusCode(devopsErr error) int

Types

type Artifacts

type Artifacts struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Downloadable bool   `json:"downloadable,omitempty" description:"downloadable or not"`
	ID           string `json:"id,omitempty" description:"id"`
	Name         string `json:"name,omitempty" description:"name"`
	Path         string `json:"path,omitempty" description:"path"`
	Size         int    `json:"size,omitempty" description:"size"`
	URL          string `json:"url,omitempty" description:"The url for Download artifacts"`
}

GetArtifacts

type Branch

type Branch struct {
	SHA1 string `json:",omitempty"`
	Name string `json:",omitempty"`
}

type BranchPipeline

type BranchPipeline struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		Scm struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"scm,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Runs struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"runs,omitempty"`
		Trends struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"trends,omitempty"`
		Queue struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"queue,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions                   []interface{} `json:"actions,omitempty" description:"the list of all actions"`
	Disabled                  bool          `json:"disabled,omitempty" description:"disable or not, if disabled, can not do any action"`
	DisplayName               string        `json:"displayName,omitempty" description:"display name"`
	EstimatedDurationInMillis int           `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
	FullDisplayName           string        `json:"fullDisplayName,omitempty" description:"full display name"`
	FullName                  string        `json:"fullName,omitempty" description:"full name"`
	LatestRun                 struct {
		Class string `` /* 135-byte string literal not displayed */
		Links struct {
			PrevRun struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"prevRun,omitempty"`
			Parent struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"parent,omitempty"`
			Tests struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"tests,omitempty"`
			Log struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"log,omitempty"`
			Self struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"self,omitempty"`
			BlueTestSummary struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"blueTestSummary,omitempty"`
			Actions struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"actions,omitempty"`
			Artifacts struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"artifacts,omitempty"`
		} `json:"_links,omitempty" description:"references the reachable path to this resource"`
		Actions          []interface{} `json:"actions,omitempty" description:"the list of all actions"`
		ArtifactsZipFile string        `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
		CauseOfBlockage  interface{}   `json:"causeOfBlockage,omitempty" description:"the cause of blockage"`
		Causes           []struct {
			Class            string `` /* 135-byte string literal not displayed */
			ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
			UserID           string `json:"userId,omitempty" description:"user id"`
			UserName         string `json:"userName,omitempty" description:"user name"`
		} `json:"causes,omitempty"`
		ChangeSet                 []interface{} `json:"changeSet,omitempty" description:"changeset information"`
		Description               interface{}   `json:"description,omitempty" description:"description"`
		DurationInMillis          int           `json:"durationInMillis,omitempty" description:"duration time in millis"`
		EnQueueTime               string        `json:"enQueueTime,omitempty" description:"the time of enter the queue"`
		EndTime                   string        `json:"endTime,omitempty" description:"the time of end"`
		EstimatedDurationInMillis int           `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
		ID                        string        `json:"id,omitempty" description:"id"`
		Name                      interface{}   `json:"name,omitempty" description:"name"`
		Organization              string        `json:"organization,omitempty" description:"the name of organization"`
		Pipeline                  string        `json:"pipeline,omitempty" description:"pipeline"`
		Replayable                bool          `json:"replayable,omitempty" description:"Replayable or not"`
		Result                    string        `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
		RunSummary                string        `json:"runSummary,omitempty" description:"pipeline run summary"`
		StartTime                 string        `json:"startTime,omitempty" description:"the time of start"`
		State                     string        `json:"state,omitempty" description:"run state. e.g. RUNNING"`
		Type                      string        `json:"type,omitempty" description:"type"`
	} `json:"latestRun,omitempty"`
	Name         string `json:"name,omitempty" description:"name"`
	Organization string `json:"organization,omitempty" description:"the name of organization"`
	Parameters   []struct {
		Class                 string `` /* 135-byte string literal not displayed */
		DefaultParameterValue struct {
			Class string      `` /* 135-byte string literal not displayed */
			Name  string      `json:"name,omitempty" description:"name"`
			Value interface{} `json:"value,omitempty" description:"value, string or bool type"`
		} `json:"defaultParameterValue,omitempty" description:""`
		Description string        `json:"description,omitempty" description:"description"`
		Name        string        `json:"name,omitempty" description:"name"`
		Type        string        `json:"type,omitempty" description:"type"`
		Choices     []interface{} `json:"choices,omitempty" description:"choices"`
	} `json:"parameters,omitempty"`
	Permissions struct {
		Create    bool `json:"create,omitempty" description:"create action"`
		Configure bool `json:"configure,omitempty" description:"configure action"`
		Read      bool `json:"read,omitempty" description:"read action"`
		Start     bool `json:"start,omitempty" description:"start action"`
		Stop      bool `json:"stop,omitempty" description:"stop action"`
	} `json:"permissions,omitempty"`
	WeatherScore int `json:"weatherScore,omitempty" description:"the score to description the result of pipeline"`
	Branch       struct {
		IsPrimary bool          `json:"isPrimary,omitempty" description:"primary or not"`
		Issues    []interface{} `json:"issues,omitempty" description:"issues"`
		URL       string        `json:"url,omitempty" description:"url"`
	} `json:"branch,omitempty"`
}

GetBranchPipeRun

type BranchPipelineRunNodes

type BranchPipelineRunNodes struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Steps struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"steps,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions            []interface{} `json:"actions,omitempty" description:"the list of all actions"`
	DisplayDescription interface{}   `json:"displayDescription,omitempty" description:"display description"`
	DisplayName        string        `json:"displayName,omitempty" description:"display name"`
	DurationInMillis   int           `json:"durationInMillis,omitempty" description:"duration time in millis"`
	ID                 string        `json:"id,omitempty" description:"id"`
	Input              *Input        `json:"input,omitempty" description:"the action should user input"`
	Result             string        `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS. e.g. SUCCESS"`
	StartTime          string        `json:"startTime,omitempty" description:"the time of start"`
	State              string        `json:"state,omitempty" description:"run state. e.g. RUNNING"`
	Type               string        `json:"type,omitempty" description:"source type, e.g. \"WorkflowRun\""`
	CauseOfBlockage    interface{}   `json:"causeOfBlockage,omitempty" description:"the cause of blockage"`
	Edges              []struct {
		Class string `` /* 135-byte string literal not displayed */
		ID    string `json:"id,omitempty" description:"id"`
		Type  string `json:"type,omitempty" description:"source type"`
	} `json:"edges,omitempty"`
	FirstParent interface{} `json:"firstParent,omitempty" description:"first parent resource"`
	Restartable bool        `json:"restartable,omitempty" description:"restartable or not"`
	Steps       []struct {
		Class string `` /* 135-byte string literal not displayed */
		Links struct {
			Self struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"self,omitempty"`
			Actions struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"actions,omitempty"`
		} `json:"_links,omitempty"`
		Actions []struct {
			Class string `json:"_class,omitempty"`
			Links struct {
				Self struct {
					Class string `json:"_class,omitempty"`
					Href  string `json:"href,omitempty"`
				} `json:"self,omitempty"`
			} `json:"_links,omitempty"`
			URLName string `json:"urlName,omitempty"`
		} `json:"actions,omitempty" description:"references the reachable path to this resource"`
		DisplayDescription interface{} `json:"displayDescription,omitempty" description:"display description"`
		DisplayName        string      `json:"displayName,omitempty" description:"display name"`
		DurationInMillis   int         `json:"durationInMillis,omitempty" description:"duration time in millis"`
		ID                 string      `json:"id,omitempty" description:"id"`
		Input              *Input      `json:"input,omitempty" description:"the action should user input"`
		Result             string      `json:"result,omitempty" description:"result"`
		StartTime          string      `json:"startTime,omitempty" description:"the time of start"`
		State              string      `json:"state,omitempty" description:"run state. e.g. RUNNING"`
		Type               string      `json:"type,omitempty" description:"source type"`
	} `json:"steps,omitempty"`
}

GetBranchPipeRunNodes

type Build

type Build struct {
	Actions   []GeneralAction
	Artifacts []struct {
		DisplayPath  string `json:"displayPath"`
		FileName     string `json:"fileName"`
		RelativePath string `json:"relativePath"`
	} `json:"artifacts"`
	Building  bool   `json:"building"`
	BuiltOn   string `json:"builtOn"`
	ChangeSet struct {
		Items []struct {
			AffectedPaths []string `json:"affectedPaths"`
			Author        struct {
				AbsoluteUrl string `json:"absoluteUrl"`
				FullName    string `json:"fullName"`
			} `json:"author"`
			Comment  string `json:"comment"`
			CommitID string `json:"commitId"`
			Date     string `json:"date"`
			ID       string `json:"id"`
			Msg      string `json:"msg"`
			Paths    []struct {
				EditType string `json:"editType"`
				File     string `json:"file"`
			} `json:"paths"`
			Timestamp int64 `json:"timestamp"`
		} `json:"items"`
		Kind      string `json:"kind"`
		Revisions []struct {
			Module   string
			Revision int
		} `json:"revision"`
	} `json:"changeSet"`
	Culprits          []Culprit   `json:"culprits"`
	Description       interface{} `json:"description"`
	Duration          int64       `json:"duration"`
	EstimatedDuration int64       `json:"estimatedDuration"`
	Executor          interface{} `json:"executor"`
	FullDisplayName   string      `json:"fullDisplayName"`
	ID                string      `json:"id"`
	KeepLog           bool        `json:"keepLog"`
	Number            int64       `json:"number"`
	QueueID           int64       `json:"queueId"`
	Result            string      `json:"result"`
	Timestamp         int64       `json:"timestamp"`
	URL               string      `json:"url"`
	Runs              []struct {
		Number int64
		URL    string
	} `json:"runs"`
}

type BuildGetter

type BuildGetter interface {
	// GetProjectPipelineBuildByType get the last build of the pipeline, status can specify the status of the last build.
	GetProjectPipelineBuildByType(projectId, pipelineId string, status string) (*Build, error)

	// GetMultiBranchPipelineBuildByType get the last build of the pipeline, status can specify the status of the last build.
	GetMultiBranchPipelineBuildByType(projectId, pipelineId, branch string, status string) (*Build, error)
}

type BuildRevision

type BuildRevision struct {
	SHA1   string   `json:"SHA1,omitempty"`
	Branch []Branch `json:"Branch,omitempty"`
}

type Builds

type Builds struct {
	BuildNumber int64         `json:"buildNumber"`
	BuildResult interface{}   `json:"buildResult"`
	Marked      BuildRevision `json:"marked"`
	Revision    BuildRevision `json:"revision"`
}

type CheckCronRes

type CheckCronRes struct {
	Result   string `json:"result,omitempty" description:"result e.g. ok, error"`
	Message  string `json:"message,omitempty" description:"message"`
	LastTime string `json:"lastTime,omitempty" description:"last run time."`
	NextTime string `json:"nextTime,omitempty" description:"next run time."`
}

type CheckPlayload

type CheckPlayload struct {
	ID         string                    `json:"id,omitempty" description:"id"`
	Parameters []CheckPlayloadParameters `json:"parameters,omitempty"`
	Abort      bool                      `json:"abort,omitempty" description:"abort or not"`
}

CheckPipeline

type CheckPlayloadParameters

type CheckPlayloadParameters struct {
	Name  string      `json:"name,omitempty" description:"name"`
	Value interface{} `json:"value,omitempty" description:"value"`
}

type CheckScript

type CheckScript struct {
	Column  int    `json:"column,omitempty" description:"column e.g. 0"`
	Line    int    `json:"line,omitempty" description:"line e.g. 0"`
	Message string `json:"message,omitempty" description:"message e.g. unexpected char: '#'"`
	Status  string `json:"status,omitempty" description:"status e.g. fail"`
}

CheckScriptCompile

type ConfigurationOperator

type ConfigurationOperator interface {
	// ReloadConfiguration reload devops configuration
	ReloadConfiguration() error

	// ApplyNewSource applies a new config file
	ApplyNewSource(string) error
}

ConfigurationOperator provides APIs for operating devops configuration, like reloading.

type CreateScmServerReq

type CreateScmServerReq struct {
	Name   string `json:"name,omitempty" description:"name of scm server"`
	ApiURL string `json:"apiUrl,omitempty"  description:"url of scm server"`
}

type Credential

type Credential struct {
	Id          string `json:"id" description:"Id of Credential, e.g. dockerhub-id"`
	Type        string `json:"type" description:"Type of Credential, e.g. ssh/kubeconfig"`
	DisplayName string `json:"display_name,omitempty" description:"Credential's display name"`
	Fingerprint *struct {
		FileName string `json:"file_name,omitempty" description:"Credential's display name and description"`
		Hash     string `json:"hash,omitempty" description:"Credential's hash"`
		Usage    []*struct {
			Name   string `json:"name,omitempty" description:"pipeline full name"`
			Ranges struct {
				Ranges []*struct {
					Start int `json:"start,omitempty" description:"Start build number"`
					End   int `json:"end,omitempty" description:"End build number"`
				} `json:"ranges,omitempty"`
			} `json:"ranges,omitempty" description:"The build number of all pipelines that use this credential"`
		} `json:"usage,omitempty" description:"all usage of Credential"`
	} `json:"fingerprint,omitempty" description:"usage of the Credential"`
	Description string `json:"description,omitempty" description:"Credential's description'"`
	Domain      string `json:"domain,omitempty" description:"Credential's domain,In ks we only use the default domain, default '_''"`
}

type CredentialOperator

type CredentialOperator interface {
	CreateCredentialInProject(projectId string, credential *v1.Secret) (string, error)

	UpdateCredentialInProject(projectId string, credential *v1.Secret) (string, error)

	GetCredentialInProject(projectId, id string) (*Credential, error)

	DeleteCredentialInProject(projectId, id string) (string, error)
}

type CronData

type CronData struct {
	PipelineName string `json:"pipelineName,omitempty" description:"Pipeline name, if pipeline haven't created, not required'"`
	Cron         string `json:"cron" description:"Cron script data."`
}

CheckCron

type Crumb

type Crumb struct {
	Class             string `` /* 135-byte string literal not displayed */
	Crumb             string `json:"crumb,omitempty" description:"crumb data"`
	CrumbRequestField string `json:"crumbRequestField,omitempty" description:"crumb request field"`
}

Getcrumb

type Culprit

type Culprit struct {
	AbsoluteUrl string
	FullName    string
}

type ErrorResponse

type ErrorResponse struct {
	Body     []byte
	Response *http.Response
	Message  string
}

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type GeneralAction

type GeneralAction struct {
	Parameters         []GeneralParameter       `json:"parameters,omitempty"`
	Causes             []map[string]interface{} `json:"causes,omitempty"`
	BuildsByBranchName map[string]Builds        `json:"buildsByBranchName,omitempty"`
	LastBuiltRevision  *BuildRevision           `json:"lastBuiltRevision,omitempty"`
	RemoteUrls         []string                 `json:"remoteUrls,omitempty"`
	ScmName            string                   `json:"scmName,omitempty"`
	Subdir             interface{}              `json:"subdir,omitempty"`
	ClassName          string                   `json:"_class,omitempty"`
	SonarTaskId        string                   `json:"ceTaskId,omitempty"`
	SonarServerUrl     string                   `json:"serverUrl,omitempty"`
	SonarDashboardUrl  string                   `json:"sonarqubeDashboardUrl,omitempty"`
	TotalCount         int64                    `json:",omitempty"`
	UrlName            string                   `json:",omitempty"`
}

type GeneralParameter

type GeneralParameter struct {
	Name  string
	Value string
}

type HttpParameters

type HttpParameters struct {
	Method   string        `json:"method,omitempty"`
	Header   http.Header   `json:"header,omitempty"`
	Body     io.ReadCloser `json:"body,omitempty"`
	Form     url.Values    `json:"form,omitempty"`
	PostForm url.Values    `json:"postForm,omitempty"`
	Url      *url.URL      `json:"url,omitempty"`
}

type Input

type Input struct {
	Class string `` /* 135-byte string literal not displayed */
	Links *struct {
		Self *struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	ID         string        `json:"id,omitempty" description:"the id of check action"`
	Message    string        `json:"message,omitempty" description:"the message of check action"`
	Ok         string        `json:"ok,omitempty" description:"check status. e.g. \"Proceed\""`
	Parameters []interface{} `json:"parameters,omitempty" description:"the parameters of check action"`
	Submitter  interface{}   `json:"submitter,omitempty" description:"check submitter"`
}

func (*Input) Approvable

func (i *Input) Approvable(identify string) (ok bool)

Approvable returns the result if the given identify (username or group name) can approve this input

func (*Input) GetSubmitters

func (i *Input) GetSubmitters() (submitters []string)

GetSubmitters returns the all submitters related to this input

type KubeconfigCredential

type KubeconfigCredential struct {
	Content string `json:"content,omitempty" description:"content of kubeconfig"`
}

type NodeStatus

type NodeStatus struct {
	Class string `json:"_class,omitempty" description:""`
	Links struct {
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Steps struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"steps,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions            []interface{} `json:"actions,omitempty" description:"the list of all actions"`
	DisplayDescription interface{}   `json:"displayDescription,omitempty" description:"display description"`
	DisplayName        string        `json:"displayName,omitempty" description:"display name"`
	DurationInMillis   int           `json:"durationInMillis,omitempty" description:"duration time in millis"`
	ID                 string        `json:"id,omitempty" description:"id"`
	Input              *Input        `json:"input,omitempty" description:"the action should user input"`
	Result             string        `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
	StartTime          string        `json:"startTime,omitempty" description:"the time of start"`
	State              string        `json:"state,omitempty" description:"run state. e.g. RUNNING"`
	Type               string        `json:"type,omitempty" description:"type"`
	CauseOfBlockage    interface{}   `json:"causeOfBlockage,omitempty" description:"the cause of blockage"`
	Edges              []struct {
		Class string `` /* 135-byte string literal not displayed */
		ID    string `json:"id,omitempty" description:"id"`
		Type  string `json:"type,omitempty" description:"type"`
	} `json:"edges,omitempty"`
	FirstParent interface{} `json:"firstParent,omitempty" description:"first parent"`
	Restartable bool        `json:"restartable,omitempty" description:"restartable or not"`
	Steps       []struct {
		Class string `` /* 135-byte string literal not displayed */
		Links struct {
			Self struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"self,omitempty"`
			Actions struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"actions,omitempty"`
		} `json:"_links,omitempty" description:"references the reachable path to this resource"`
		Actions []struct {
			Class string `json:"_class,omitempty" description:"references the reachable path to this resource"`
			Links struct {
				Self struct {
					Class string `json:"_class,omitempty"`
					Href  string `json:"href,omitempty"`
				} `json:"self,omitempty" description:""`
			} `json:"_links,omitempty" description:"references the reachable path to this resource"`
			URLName string `json:"urlName,omitempty" description:"url name"`
		} `json:"actions,omitempty"`
		DisplayDescription interface{} `json:"displayDescription,omitempty" description:"display description"`
		DisplayName        string      `json:"displayName,omitempty" description:"display name"`
		DurationInMillis   int         `json:"durationInMillis,omitempty" description:"duration time in millis"`
		ID                 string      `json:"id,omitempty" description:"id"`
		Input              *Input      `json:"input,omitempty" description:"the action should user input"`
		Result             string      `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
		StartTime          string      `json:"startTime,omitempty" description:"the time of start"`
		State              string      `json:"state,omitempty" description:"run state. e.g. RUNNING"`
		Type               string      `json:"type,omitempty" description:"type"`
	} `json:"steps,omitempty"`
}

GetNodeStatus

type NodeSteps

type NodeSteps struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions []struct {
		Class string `` /* 135-byte string literal not displayed */
		Links struct {
			Self struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"self,omitempty"`
		} `json:"_links,omitempty" description:"references the reachable path to this resource"`
		URLName string `json:"urlName,omitempty" description:"url name"`
	} `json:"actions,omitempty"`
	DisplayDescription string `json:"displayDescription,omitempty" description:"display description"`
	DisplayName        string `json:"displayName,omitempty" description:"display name"`
	DurationInMillis   int    `json:"durationInMillis,omitempty" description:"duration time in mullis"`
	ID                 string `json:"id,omitempty" description:"id"`
	Input              *Input `json:"input,omitempty" description:"the action should user input"`
	Result             string `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
	StartTime          string `json:"startTime,omitempty" description:"the time of starts"`
	State              string `json:"state,omitempty" description:"run state. e.g. SKIPPED"`
	Type               string `json:"type,omitempty" description:"type"`
	// Approvable indicates if this step can be approved by current user
	Approvable bool `json:"aprovable" description:"indicate if this step can be approved by current user"`
}

GetNodeSteps

type NodesDetail

type NodesDetail struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Steps struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"steps,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions            []interface{} `json:"actions,omitempty" description:"the list of all actions"`
	DisplayDescription interface{}   `json:"displayDescription,omitempty" description:"display description"`
	DisplayName        string        `json:"displayName,omitempty" description:"display name"`
	DurationInMillis   int           `json:"durationInMillis,omitempty" description:"duration time in mullis"`
	ID                 string        `json:"id,omitempty" description:"id"`
	Input              *Input        `json:"input,omitempty" description:"the action should user input"`
	Result             string        `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
	StartTime          string        `json:"startTime,omitempty" description:"the time of start"`
	State              string        `json:"state,omitempty" description:"run state. e.g. FINISHED"`
	Type               string        `json:"type,omitempty" description:"type"`
	CauseOfBlockage    interface{}   `json:"causeOfBlockage,omitempty" description:"the cause of blockage"`
	Edges              []interface{} `json:"edges,omitempty" description:"edges"`
	FirstParent        interface{}   `json:"firstParent,omitempty" description:"first parent"`
	Restartable        bool          `json:"restartable,omitempty" description:"restartable or not"`
	Steps              []NodeSteps   `json:"steps,omitempty" description:"steps"`
}

type NodesStepsIndex

type NodesStepsIndex struct {
	Id    int         `json:"id,omitempty" description:"id"`
	Steps []NodeSteps `json:"steps,omitempty" description:"steps"`
}

type OrgRepo

type OrgRepo struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Repositories struct {
		Class string `` /* 135-byte string literal not displayed */
		Links struct {
			Self struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"self,omitempty"`
		} `json:"_links,omitempty" description:"references the reachable path to this resource"`
		Items []struct {
			Class string `` /* 135-byte string literal not displayed */
			Links struct {
				Self struct {
					Class string `json:"_class,omitempty"`
					Href  string `json:"href,omitempty"`
				} `json:"self,omitempty"`
			} `json:"_links,omitempty" description:"references the reachable path to this resource"`
			DefaultBranch string `json:"defaultBranch,omitempty" description:"default branch"`
			Description   string `json:"description,omitempty" description:"description"`
			Name          string `json:"name,omitempty" description:"name"`
			Permissions   struct {
				Admin bool `json:"admin,omitempty" description:"admin"`
				Push  bool `json:"push,omitempty" description:"push action"`
				Pull  bool `json:"pull,omitempty" description:"pull action"`
			} `json:"permissions,omitempty"`
			Private  bool   `json:"private,omitempty" description:"private or not"`
			FullName string `json:"fullName,omitempty" description:"full name"`
		} `json:"items,omitempty"`
		LastPage interface{} `json:"lastPage,omitempty" description:"last page"`
		NextPage interface{} `json:"nextPage,omitempty" description:"next page"`
		PageSize int         `json:"pageSize,omitempty" description:"page size"`
	} `json:"repositories,omitempty"`
}

GetOrgRepo

type Parameter

type Parameter struct {
	Name  string      `json:"name,omitempty" description:"name"`
	Value interface{} `json:"value,omitempty" description:"value"`
}

type Pipeline

type Pipeline struct {
	Annotations map[string]string `json:"annotations,omitempty" description:"Add annotations from crd" `
	Class       string            `` /* 136-byte string literal not displayed */
	Links       struct {
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		Scm struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"scm,omitempty"`
		Branches struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"branches,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Runs struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"runs,omitempty"`
		Trends struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"trends,omitempty"`
		Queue struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"queue,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource."`
	Actions         []interface{} `json:"actions,omitempty" description:"the list of all actions."`
	Disabled        interface{}   `json:"disabled,omitempty" description:"disable or not, if disabled, can not do any action."`
	DisplayName     string        `json:"displayName,omitempty" description:"display name"`
	FullDisplayName string        `json:"fullDisplayName,omitempty" description:"full display name"`
	FullName        string        `json:"fullName,omitempty" description:"full name"`
	Name            string        `json:"name,omitempty" description:"name"`
	Organization    string        `json:"organization,omitempty" description:"the name of organization"`
	Parameters      interface{}   `` /* 128-byte string literal not displayed */
	Permissions     struct {
		Create    bool `json:"create,omitempty" description:"create action"`
		Configure bool `json:"configure,omitempty" description:"configure action"`
		Read      bool `json:"read,omitempty" description:"read action"`
		Start     bool `json:"start,omitempty" description:"start action"`
		Stop      bool `json:"stop,omitempty" description:"stop action"`
	} `json:"permissions,omitempty" description:"permissions"`
	EstimatedDurationInMillis      int           `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time, unit is millis"`
	NumberOfFolders                int           `json:"numberOfFolders,omitempty" description:"number of folders"`
	NumberOfPipelines              int           `json:"numberOfPipelines,omitempty" description:"number of pipelines"`
	PipelineFolderNames            []interface{} `json:"pipelineFolderNames,omitempty" description:"pipeline folder names"`
	WeatherScore                   int           `json:"weatherScore" description:"the score to description the result of pipeline activity"`
	BranchNames                    []string      `json:"branchNames,omitempty" description:"branch names"`
	NumberOfFailingBranches        int           `json:"numberOfFailingBranches,omitempty" description:"number of failing branches"`
	NumberOfFailingPullRequests    int           `json:"numberOfFailingPullRequests,omitempty" description:"number of failing pull requests"`
	NumberOfSuccessfulBranches     int           `json:"numberOfSuccessfulBranches,omitempty" description:"number of successful pull requests"`
	NumberOfSuccessfulPullRequests int           `json:"numberOfSuccessfulPullRequests,omitempty" description:"number of successful pull requests"`
	ScmSource                      struct {
		Class  string      `` /* 135-byte string literal not displayed */
		APIURL interface{} `json:"apiUrl,omitempty" description:"api url"`
		ID     string      `json:"id,omitempty" description:"The id of the source configuration management (SCM)."`
	} `json:"scmSource,omitempty"`
	TotalNumberOfBranches     int `json:"totalNumberOfBranches,omitempty" description:"total number of branches"`
	TotalNumberOfPullRequests int `json:"totalNumberOfPullRequests,omitempty" description:"total number of pull requests"`
}

GetPipeline & SearchPipelines

type PipelineBranch

type PipelineBranch []PipelineBranchItem

GetPipeBranch

type PipelineBranchItem

type PipelineBranchItem struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		Scm struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"scm,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Runs struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"runs,omitempty"`
		Trends struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"trends,omitempty"`
		Queue struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"queue,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions                   []interface{} `json:"actions,omitempty" description:"the list of all actions."`
	Disabled                  bool          `json:"disabled,omitempty" description:"disable or not, if disabled, can not do any action"`
	DisplayName               string        `json:"displayName,omitempty" description:"display name"`
	EstimatedDurationInMillis int           `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time, unit is millis"`
	FullDisplayName           string        `json:"fullDisplayName,omitempty" description:"full display name"`
	FullName                  string        `json:"fullName,omitempty" description:"full name"`
	LatestRun                 struct {
		Class string `` /* 135-byte string literal not displayed */
		Links struct {
			PrevRun struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"prevRun,omitempty"`
			Parent struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"parent,omitempty"`
			Tests struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"tests,omitempty"`
			Log struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"log,omitempty"`
			Self struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"self,omitempty"`
			BlueTestSummary struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"blueTestSummary,omitempty"`
			Actions struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"actions,omitempty"`
			Artifacts struct {
				Class string `json:"_class,omitempty"`
				Href  string `json:"href,omitempty"`
			} `json:"artifacts,omitempty"`
		} `json:"_links,omitempty" description:"references the reachable path to this resource"`
		Actions          []interface{} `json:"actions,omitempty" description:"the list of all actions"`
		ArtifactsZipFile string        `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
		CauseOfBlockage  interface{}   `json:"causeOfBlockage,omitempty" description:"the cause of blockage"`
		Causes           []struct {
			Class            string `` /* 135-byte string literal not displayed */
			ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
		} `json:"causes,omitempty"`
		ChangeSet                 []interface{} `json:"changeSet,omitempty" description:"changeset information"`
		Description               interface{}   `json:"description,omitempty" description:"description"`
		DurationInMillis          int           `json:"durationInMillis,omitempty" description:"duration time in millis"`
		EnQueueTime               string        `json:"enQueueTime,omitempty" description:"the time of enter the queue"`
		EndTime                   string        `json:"endTime,omitempty" description:"the time of end"`
		EstimatedDurationInMillis int           `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
		ID                        string        `json:"id,omitempty" description:"id"`
		Name                      interface{}   `json:"name,omitempty" description:"name"`
		Organization              string        `json:"organization,omitempty" description:"the name of organization"`
		Pipeline                  string        `json:"pipeline,omitempty" description:"pipeline"`
		Replayable                bool          `json:"replayable,omitempty" description:"replayable or not"`
		Result                    string        `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
		RunSummary                string        `json:"runSummary,omitempty" description:"pipeline run summary"`
		StartTime                 string        `json:"startTime,omitempty" description:"start run"`
		State                     string        `json:"state,omitempty" description:"run state. e.g. RUNNING"`
		Type                      string        `json:"type,omitempty" description:"type"`
	} `json:"latestRun,omitempty"`
	Name         string `json:"name,omitempty" description:"name"`
	Organization string `json:"organization,omitempty" description:"the name of organization"`
	Parameters   []struct {
		Class                 string `` /* 135-byte string literal not displayed */
		DefaultParameterValue struct {
			Class string      `` /* 135-byte string literal not displayed */
			Name  string      `json:"name,omitempty" description:"name"`
			Value interface{} `json:"value,omitempty" description:"value"`
		} `json:"defaultParameterValue,omitempty"`
		Description string `json:"description,omitempty" description:"description"`
		Name        string `json:"name,omitempty" description:"name"`
		Type        string `json:"type,omitempty" description:"type"`
	} `json:"parameters,omitempty"`
	Permissions struct {
		Create    bool `json:"create,omitempty" description:"create action"`
		Configure bool `json:"configure,omitempty" description:"configure action"`
		Read      bool `json:"read,omitempty" description:"read action"`
		Start     bool `json:"start,omitempty" description:"start action"`
		Stop      bool `json:"stop,omitempty" description:"stop action"`
	} `json:"permissions,omitempty"`
	WeatherScore int `json:"weatherScore,omitempty" description:"the score to description the result of pipeline"`
	Branch       struct {
		IsPrimary bool          `json:"isPrimary,omitempty" description:"primary or not"`
		Issues    []interface{} `json:"issues,omitempty" description:"issues"`
		URL       string        `json:"url,omitempty" description:"url"`
	} `json:"branch,omitempty"`
	PullRequest struct {
		Author string `json:"author,omitempty" description:"author of pull request"`
		ID     string `json:"id,omitempty" description:"id of pull request"`
		Title  string `json:"title,omitempty" description:"title of pull request"`
		URL    string `json:"url,omitempty" description:"url of pull request"`
	} `json:"pullRequest,omitempty"`
}

type PipelineList

type PipelineList struct {
	Items []Pipeline `json:"items"`
	Total int        `json:"total_count"`
}

func UnmarshalPipeline

func UnmarshalPipeline(total int, data []byte) (pipelineList *PipelineList, err error)

UnmarshalPipeline unmarshal data into the Pipeline list

type PipelineOperator

type PipelineOperator interface {
	// Pipelinne operator interface
	CheckPipelineName(projectName, pipelineName string, httpParameters *HttpParameters) (map[string]interface{}, error)
	GetPipeline(projectName, pipelineName string, httpParameters *HttpParameters) (*Pipeline, error)
	ListPipelines(httpParameters *HttpParameters) (*PipelineList, error)
	GetPipelineRun(projectName, pipelineName, runId string, httpParameters *HttpParameters) (*PipelineRun, error)
	ListPipelineRuns(projectName, pipelineName string, httpParameters *HttpParameters) (*PipelineRunList, error)
	StopPipeline(projectName, pipelineName, runId string, httpParameters *HttpParameters) (*StopPipeline, error)
	ReplayPipeline(projectName, pipelineName, runId string, httpParameters *HttpParameters) (*ReplayPipeline, error)
	RunPipeline(projectName, pipelineName string, httpParameters *HttpParameters) (*RunPipeline, error)
	GetArtifacts(projectName, pipelineName, runId string, httpParameters *HttpParameters) ([]Artifacts, error)
	DownloadArtifact(projectName, pipelineName, runId, filename string, isMultiBranch bool, branchName string) (io.ReadCloser, error)
	GetRunLog(projectName, pipelineName, runId string, httpParameters *HttpParameters) ([]byte, http.Header, error)
	GetStepLog(projectName, pipelineName, runId, nodeId, stepId string, httpParameters *HttpParameters) ([]byte, http.Header, error)
	GetNodeSteps(projectName, pipelineName, runId, nodeId string, httpParameters *HttpParameters) ([]NodeSteps, error)
	GetPipelineRunNodes(projectName, pipelineName, runId string, httpParameters *HttpParameters) ([]PipelineRunNodes, error)
	SubmitInputStep(projectName, pipelineName, runId, nodeId, stepId string, httpParameters *HttpParameters) ([]byte, error)

	//BranchPipelinne operator interface
	GetBranchPipeline(projectName, pipelineName, branchName string, httpParameters *HttpParameters) (*BranchPipeline, error)
	GetBranchPipelineRun(projectName, pipelineName, branchName, runId string, httpParameters *HttpParameters) (*PipelineRun, error)
	StopBranchPipeline(projectName, pipelineName, branchName, runId string, httpParameters *HttpParameters) (*StopPipeline, error)
	ReplayBranchPipeline(projectName, pipelineName, branchName, runId string, httpParameters *HttpParameters) (*ReplayPipeline, error)
	RunBranchPipeline(projectName, pipelineName, branchName string, httpParameters *HttpParameters) (*RunPipeline, error)
	GetBranchArtifacts(projectName, pipelineName, branchName, runId string, httpParameters *HttpParameters) ([]Artifacts, error)
	GetBranchRunLog(projectName, pipelineName, branchName, runId string, httpParameters *HttpParameters) ([]byte, error)
	GetBranchStepLog(projectName, pipelineName, branchName, runId, nodeId, stepId string, httpParameters *HttpParameters) ([]byte, http.Header, error)
	GetBranchNodeSteps(projectName, pipelineName, branchName, runId, nodeId string, httpParameters *HttpParameters) ([]NodeSteps, error)
	GetBranchPipelineRunNodes(projectName, pipelineName, branchName, runId string, httpParameters *HttpParameters) ([]BranchPipelineRunNodes, error)
	SubmitBranchInputStep(projectName, pipelineName, branchName, runId, nodeId, stepId string, httpParameters *HttpParameters) ([]byte, error)
	GetPipelineBranch(projectName, pipelineName string, httpParameters *HttpParameters) (*PipelineBranch, error)
	ScanBranch(projectName, pipelineName string, httpParameters *HttpParameters) ([]byte, error)

	// Common pipeline operator interface
	GetConsoleLog(projectName, pipelineName string, httpParameters *HttpParameters) ([]byte, error)
	GetCrumb(httpParameters *HttpParameters) (*Crumb, error)

	// SCM operator interface
	GetSCMServers(scmId string, httpParameters *HttpParameters) ([]SCMServer, error)
	GetSCMOrg(scmId string, httpParameters *HttpParameters) ([]SCMOrg, error)
	GetOrgRepo(scmId, organizationId string, httpParameters *HttpParameters) (OrgRepo, error)
	CreateSCMServers(scmId string, httpParameters *HttpParameters) (*SCMServer, error)
	Validate(scmId string, httpParameters *HttpParameters) (*Validates, error)

	//Webhook operator interface
	GetNotifyCommit(httpParameters *HttpParameters) ([]byte, error)
	GithubWebhook(httpParameters *HttpParameters) ([]byte, error)
	GenericWebhook(httpParameters *HttpParameters) ([]byte, error)

	CheckScriptCompile(projectName, pipelineName string, httpParameters *HttpParameters) (*CheckScript, error)
	CheckCron(projectName string, httpParameters *HttpParameters) (*CheckCronRes, error)
}

type PipelineRun

type PipelineRun struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		PrevRun struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"prevRun,omitempty"`
		Parent struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"parent,omitempty"`
		Tests struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"tests,omitempty"`
		Nodes struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"nodes,omitempty"`
		Log struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"log,omitempty"`
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		BlueTestSummary struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"blueTestSummary,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Steps struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"steps,omitempty"`
		Artifacts struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"artifacts,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions          []interface{} `json:"actions,omitempty" description:"the list of all actions"`
	ArtifactsZipFile interface{}   `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
	CauseOfBlockage  interface{}   `json:"causeOfBlockage,omitempty" description:"the cause of blockage"`
	Causes           []struct {
		Class            string `` /* 135-byte string literal not displayed */
		ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
		UserID           string `json:"userId,omitempty" description:"user id"`
		UserName         string `json:"userName,omitempty" description:"user name"`
	} `json:"causes,omitempty"`
	ChangeSet                 []interface{} `json:"changeSet,omitempty" description:"changeset information"`
	Description               interface{}   `json:"description,omitempty" description:"description"`
	DurationInMillis          int           `json:"durationInMillis,omitempty" description:"duration time in millis"`
	EnQueueTime               string        `json:"enQueueTime,omitempty" description:"the time of enter the queue"`
	EndTime                   string        `json:"endTime,omitempty" description:"the time of end"`
	EstimatedDurationInMillis int           `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
	ID                        string        `json:"id,omitempty" description:"id"`
	Name                      interface{}   `json:"name,omitempty" description:"name"`
	Organization              string        `json:"organization,omitempty" description:"the name of organization"`
	Pipeline                  string        `json:"pipeline,omitempty" description:"the name of pipeline"`
	Replayable                bool          `json:"replayable,omitempty" description:"replayable or not"`
	Result                    string        `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
	RunSummary                string        `json:"runSummary,omitempty" description:"pipeline run summary"`
	StartTime                 string        `json:"startTime,omitempty" description:"the time of start"`
	State                     string        `json:"state,omitempty" description:"run state. e.g. RUNNING"`
	Type                      string        `json:"type,omitempty" description:"type"`
	Branch                    interface{}   `json:"branch,omitempty" description:"branch"`
	CommitID                  interface{}   `json:"commitId,omitempty" description:"commit id"`
	CommitURL                 interface{}   `json:"commitUrl,omitempty" description:"commit url"`
	PullRequest               interface{}   `json:"pullRequest,omitempty" description:"pull request"`
}

GetPipelineRun

type PipelineRunList

type PipelineRunList struct {
	Items []PipelineRun `json:"items"`
	Total int           `json:"totalItems"`
}

GetPipeBranchRun & SearchPipelineRuns

type PipelineRunNodes

type PipelineRunNodes struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Steps struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"steps,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions            []interface{} `json:"actions,omitempty" description:"the list of all actions"`
	DisplayDescription interface{}   `json:"displayDescription,omitempty" description:"display description"`
	DisplayName        string        `json:"displayName,omitempty" description:"display name"`
	DurationInMillis   int           `json:"durationInMillis,omitempty" description:"duration time in mullis"`
	ID                 string        `json:"id,omitempty" description:"id"`
	Input              *Input        `json:"input,omitempty" description:"the action should user input"`
	Result             string        `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
	StartTime          string        `json:"startTime,omitempty" description:"the time of start"`
	State              string        `json:"state,omitempty" description:"run state. e.g. FINISHED"`
	Type               string        `json:"type,omitempty" description:"type"`
	CauseOfBlockage    interface{}   `json:"causeOfBlockage,omitempty" description:"the cause of blockage"`
	Edges              []interface{} `json:"edges,omitempty" description:"edges"`
	FirstParent        interface{}   `json:"firstParent,omitempty" description:"first parent"`
	Restartable        bool          `json:"restartable,omitempty" description:"restartable or not"`
}

GetPipelineRunNodes

type ProjectOperator

type ProjectOperator interface {
	CreateDevOpsProject(projectId string) (string, error)
	DeleteDevOpsProject(projectId string) error
	GetDevOpsProject(projectId string) (string, error)
}

* project operator, providing API for creating/getting/deleting projects The actual data of the project is stored in the CRD, so we only need to create the project with the corresponding ID in the CI/CD system.

type ProjectPermissionIds

type ProjectPermissionIds struct {
	CredentialCreate        bool `json:"com.cloudbees.plugins.credentials.CredentialsProvider.Create"`
	CredentialUpdate        bool `json:"com.cloudbees.plugins.credentials.CredentialsProvider.Update"`
	CredentialView          bool `json:"com.cloudbees.plugins.credentials.CredentialsProvider.View"`
	CredentialDelete        bool `json:"com.cloudbees.plugins.credentials.CredentialsProvider.Delete"`
	CredentialManageDomains bool `json:"com.cloudbees.plugins.credentials.CredentialsProvider.ManageDomains"`
	ItemBuild               bool `json:"hudson.model.Item.Build"`
	ItemCreate              bool `json:"hudson.model.Item.Create"`
	ItemRead                bool `json:"hudson.model.Item.Read"`
	ItemConfigure           bool `json:"hudson.model.Item.Configure"`
	ItemCancel              bool `json:"hudson.model.Item.Cancel"`
	ItemMove                bool `json:"hudson.model.Item.Move"`
	ItemDiscover            bool `json:"hudson.model.Item.Discover"`
	ItemWorkspace           bool `json:"hudson.model.Item.Workspace"`
	ItemDelete              bool `json:"hudson.model.Item.Delete"`
	RunUpdate               bool `json:"hudson.model.Run.Update"`
	RunDelete               bool `json:"hudson.model.Run.Delete"`
	RunReplay               bool `json:"hudson.model.Run.Replay"`
	SCMTag                  bool `json:"hudson.scm.SCM.Tag"`
}

define the id of project permission items

type ProjectPipelineOperator

type ProjectPipelineOperator interface {
	CreateProjectPipeline(projectId string, pipeline *v1alpha3.Pipeline) (string, error)
	DeleteProjectPipeline(projectId string, pipelineId string) (string, error)
	UpdateProjectPipeline(projectId string, pipeline *v1alpha3.Pipeline) (string, error)
	GetProjectPipelineConfig(projectId, pipelineId string) (*v1alpha3.Pipeline, error)
}

type ReplayPipeline

type ReplayPipeline struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Parent struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"parent,omitempty"`
		Tests struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"tests,omitempty"`
		Log struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"log,omitempty"`
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		BlueTestSummary struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"blueTestSummary,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Artifacts struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"artifacts,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions          []interface{} `json:"actions,omitempty" description:"the list of all actions."`
	ArtifactsZipFile interface{}   `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
	CauseOfBlockage  string        `json:"causeOfBlockage,omitempty" description:"the cause of blockage"`
	Causes           []struct {
		Class            string `` /* 135-byte string literal not displayed */
		ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
		UserID           string `json:"userId,omitempty" description:"user id"`
		UserName         string `json:"userName,omitempty" description:"user name"`
	} `json:"causes,omitempty"`
	ChangeSet                 []interface{} `json:"changeSet,omitempty" description:"changeset information"`
	Description               interface{}   `json:"description,omitempty" description:"description"`
	DurationInMillis          interface{}   `json:"durationInMillis,omitempty" description:"duration time in millis"`
	EnQueueTime               interface{}   `json:"enQueueTime,omitempty" description:"the time of enter the queue"`
	EndTime                   interface{}   `json:"endTime,omitempty" description:"the time of end"`
	EstimatedDurationInMillis interface{}   `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time, unit is millis"`
	ID                        string        `json:"id,omitempty" description:"id"`
	Name                      interface{}   `json:"name,omitempty" description:"name"`
	Organization              string        `json:"organization,omitempty" description:"the name of organization"`
	Pipeline                  string        `json:"pipeline,omitempty" description:"pipeline"`
	Replayable                bool          `json:"replayable,omitempty" description:"replayable or not"`
	Result                    string        `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
	RunSummary                interface{}   `json:"runSummary,omitempty" description:"pipeline run summary"`
	StartTime                 interface{}   `json:"startTime,omitempty" description:"the time of start"`
	State                     string        `json:"state,omitempty" description:"run state. e.g. RUNNING"`
	Type                      string        `json:"type,omitempty" description:"type"`
	QueueID                   string        `json:"queueId,omitempty" description:"queue id"`
}

ReplayPipeline

type ReqJenkinsfile

type ReqJenkinsfile struct {
	Jenkinsfile string `json:"jenkinsfile,omitempty" description:"jenkinsfile"`
}

type ReqJson

type ReqJson struct {
	Json string `json:"json,omitempty" description:"json data"`
}

ToJenkinsfile requests

type ReqScript

type ReqScript struct {
	Value string `json:"value,omitempty" description:"Pipeline script data"`
}

CheckScriptCompile

type ResJenkinsfile

type ResJenkinsfile struct {
	Status string `json:"status,omitempty" description:"status e.g. ok"`
	Data   struct {
		Result      string `json:"result,omitempty" description:"result e.g. success"`
		Jenkinsfile string `json:"jenkinsfile,omitempty" description:"jenkinsfile"`
		Errors      []struct {
			Location []string `json:"location,omitempty" description:"err location"`
			Error    string   `json:"error,omitempty" description:"error message"`
		} `json:"errors,omitempty"`
	} `json:"data,omitempty"`
}

ToJenkinsfile response

type RunPayload

type RunPayload struct {
	Parameters []Parameter `json:"parameters,omitempty"`
}

type RunPipeline

type RunPipeline struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Parent struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"parent,omitempty"`
		Tests struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"tests,omitempty"`
		Log struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"log,omitempty"`
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		BlueTestSummary struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"blueTestSummary,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Artifacts struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"artifacts,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions          []interface{} `json:"actions,omitempty" description:"the list of all actions"`
	ArtifactsZipFile interface{}   `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
	CauseOfBlockage  string        `json:"causeOfBlockage,omitempty" description:"the cause of blockage"`
	Causes           []struct {
		Class            string `` /* 135-byte string literal not displayed */
		ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
		UserID           string `json:"userId,omitempty" description:"user id"`
		UserName         string `json:"userName,omitempty" description:"user name"`
	} `json:"causes,omitempty"`
	ChangeSet                 []interface{} `json:"changeSet,omitempty" description:"changeset information"`
	Description               interface{}   `json:"description,omitempty" description:"description"`
	DurationInMillis          interface{}   `json:"durationInMillis,omitempty" description:"duration time in millis"`
	EnQueueTime               interface{}   `json:"enQueueTime,omitempty" description:"the time of enter the queue"`
	EndTime                   interface{}   `json:"endTime,omitempty" description:"the time of end"`
	EstimatedDurationInMillis interface{}   `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
	ID                        string        `json:"id,omitempty" description:"id"`
	Name                      interface{}   `json:"name,omitempty" description:"name"`
	Organization              string        `json:"organization,omitempty" description:"the name of organization"`
	Pipeline                  string        `json:"pipeline,omitempty" description:"pipeline"`
	Replayable                bool          `json:"replayable,omitempty" description:"replayable or not"`
	Result                    string        `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
	RunSummary                interface{}   `json:"runSummary,omitempty" description:"pipeline run summary"`
	StartTime                 interface{}   `json:"startTime,omitempty" description:"the time of start"`
	State                     string        `json:"state,omitempty" description:"run state. e.g. RUNNING"`
	Type                      string        `json:"type,omitempty" description:"type"`
	QueueID                   string        `json:"queueId,omitempty" description:"queue id"`
}

RunPipeline

type SCMOrg

type SCMOrg struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Repositories struct {
			Class string `` /* 135-byte string literal not displayed */
			Href  string `json:"href,omitempty" description:"url in api"`
		} `json:"repositories,omitempty"`
		Self struct {
			Class string `` /* 135-byte string literal not displayed */
			Href  string `json:"href,omitempty" description:"self url in api"`
		} `json:"self,omitempty" description:"scm org self info"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Avatar                      string `json:"avatar,omitempty" description:"the url of organization avatar"`
	Key                         string `json:"key,omitempty" description:"the key of a Bitbucket organization"`
	JenkinsOrganizationPipeline bool   `json:"jenkinsOrganizationPipeline,omitempty" description:"weather or not already have jenkins pipeline."`
	Name                        string `json:"name,omitempty" description:"organization name"`
}

GetSCMOrg

type SCMServer

type SCMServer struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Self struct {
			Class string `` /* 135-byte string literal not displayed */
			Href  string `json:"href,omitempty" description:"self url in api"`
		} `json:"self,omitempty" description:"scm server self info"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	ID     string `json:"id,omitempty" description:"server id of scm server"`
	Name   string `json:"name,omitempty" description:"name of scm server"`
	ApiURL string `json:"apiUrl,omitempty"  description:"url of scm server"`
}

type SecretTextCredential

type SecretTextCredential struct {
	Secret string `json:"secret,omitempty" description:"secret content of credential"`
}

type SshCredential

type SshCredential struct {
	Username   string `json:"username,omitempty" description:"username of ssh credential"`
	Passphrase string `json:"passphrase,omitempty" description:"passphrase of ssh credential, password of ssh credential"`
	PrivateKey string `json:"private_key,omitempty" mapstructure:"private_key" description:"private key of ssh credential"`
}

type StopPipeline

type StopPipeline struct {
	Class string `` /* 135-byte string literal not displayed */
	Links struct {
		Parent struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"parent,omitempty"`
		Tests struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"tests,omitempty"`
		Nodes struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"nodes,omitempty"`
		Log struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"log,omitempty"`
		Self struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"self,omitempty"`
		BlueTestSummary struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"blueTestSummary,omitempty"`
		Actions struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"actions,omitempty"`
		Steps struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"steps,omitempty"`
		Artifacts struct {
			Class string `json:"_class,omitempty"`
			Href  string `json:"href,omitempty"`
		} `json:"artifacts,omitempty"`
	} `json:"_links,omitempty" description:"references the reachable path to this resource"`
	Actions          []interface{} `json:"actions,omitempty" description:"the list of all actions."`
	ArtifactsZipFile interface{}   `json:"artifactsZipFile,omitempty" description:"the artifacts zip file"`
	CauseOfBlockage  interface{}   `json:"causeOfBlockage,omitempty" description:"the cause of blockage"`
	Causes           []struct {
		Class            string `` /* 135-byte string literal not displayed */
		ShortDescription string `json:"shortDescription,omitempty" description:"short description"`
	} `json:"causes,omitempty"`
	ChangeSet                 []interface{} `json:"changeSet,omitempty" description:"changeset information"`
	Description               interface{}   `json:"description,omitempty" description:"description"`
	DurationInMillis          int           `json:"durationInMillis,omitempty" description:"duration time in millis"`
	EnQueueTime               string        `json:"enQueueTime,omitempty" description:"the time of enter the queue"`
	EndTime                   string        `json:"endTime,omitempty" description:"the time of end"`
	EstimatedDurationInMillis int           `json:"estimatedDurationInMillis,omitempty" description:"estimated duration time in millis"`
	ID                        string        `json:"id,omitempty" description:"id"`
	Name                      interface{}   `json:"name,omitempty" description:"name"`
	Organization              string        `json:"organization,omitempty" description:"the name of organization"`
	Pipeline                  string        `json:"pipeline,omitempty" description:"pipeline"`
	Replayable                bool          `json:"replayable,omitempty" description:"replayable or not"`
	Result                    string        `json:"result,omitempty" description:"the result of pipeline run. e.g. SUCCESS"`
	RunSummary                string        `json:"runSummary,omitempty" description:"pipeline run summary"`
	StartTime                 string        `json:"startTime,omitempty" description:"the time of start"`
	State                     string        `json:"state,omitempty" description:"run state. e.g. RUNNING"`
	Type                      string        `json:"type,omitempty" description:"type"`
	Branch                    struct {
		IsPrimary bool          `json:"isPrimary,omitempty" description:"primary or not"`
		Issues    []interface{} `json:"issues,omitempty" description:"issues"`
		URL       string        `json:"url,omitempty" description:"url"`
	} `json:"branch,omitempty"`
	CommitID    string      `json:"commitId,omitempty" description:"commit id"`
	CommitURL   interface{} `json:"commitUrl,omitempty" description:"commit url"`
	PullRequest interface{} `json:"pullRequest,omitempty" description:"pull request"`
}

StopPipeline

type UsernamePasswordCredential

type UsernamePasswordCredential struct {
	Username string `json:"username,omitempty" description:"username of username_password credential"`
	Password string `json:"password,omitempty" description:"password of username_password credential"`
}

type Validates

type Validates struct {
	CredentialID string `json:"credentialId,omitempty" description:"the id of credential"`
}

Validate

Directories

Path Synopsis
Gojenkins is a Jenkins Client in Go, that exposes the jenkins REST api in a more developer friendly way.
Gojenkins is a Jenkins Client in Go, that exposes the jenkins REST api in a more developer friendly way.
reflectutils
Package reflectutils deep provides function deep.Equal which is like reflect.DeepEqual but returns a list of differences.
Package reflectutils deep provides function deep.Equal which is like reflect.DeepEqual but returns a list of differences.
Package v1alpha3 contains API Schema definitions for the devops.kubesphere.io v1alpha3 API group +kubebuilder:object:generate=true +groupName=devops.kubesphere.io
Package v1alpha3 contains API Schema definitions for the devops.kubesphere.io v1alpha3 API group +kubebuilder:object:generate=true +groupName=devops.kubesphere.io

Jump to

Keyboard shortcuts

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