Documentation
¶
Index ¶
- Constants
- type ApiBambooDeployBuild
- type ApiBambooDeployBuildAgent
- type ApiBambooDeployBuildKey
- type ApiBambooDeployProject
- type ApiBambooDeploymentVersion
- type ApiBambooEnvironment
- type ApiBambooJob
- type ApiBambooJobBuild
- type ApiBambooKey
- type ApiBambooLink
- type ApiBambooOperations
- type ApiBambooPlan
- type ApiBambooPlanBuild
- type ApiBambooPlans
- type ApiBambooProject
- type ApiBambooProjectResponse
- type ApiBambooProjects
- type ApiBambooSearchProjectResponse
- type ApiBambooServerInfo
- type ApiBambooSizeData
- type ApiRepository
- type ApiSearchEntityProject
- type ApiSearchResultProjects
- type BambooApiParams
- type BambooConn
- type BambooConnection
- type BambooDeployBuild
- type BambooDeployEnvironment
- type BambooJob
- type BambooJobBuild
- type BambooOptions
- type BambooPlan
- type BambooPlanBuild
- type BambooPlanBuildVcsRevision
- type BambooProject
- type BambooResponse
- type BambooScopeConfig
- type Parent
Constants ¶
View Source
const ( FAILED = "Failed" ERROR = "ERROR" UNDEPLOYED = "UNDEPLOYED" UNKNOWN = "Unknown" STOPPED = "Stopped" SKIPPED = "Skipped" SUCCESSFUL = "Successful" COMPLETED = "COMPLETED" PAUSED = "COMPLETED" HALTED = "HALTED" IN_PROGRESS = "IN_PROGRESS" PENDING = "PENDING" BUILDING = "BUILDING" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApiBambooDeployBuild ¶
type ApiBambooDeployBuild struct {
DeploymentVersionName string `json:"deploymentVersionName"`
Id uint64 `json:"id"`
DeploymentState string `json:"deploymentState"`
LifeCycleState string `json:"lifeCycleState"`
StartedDate int64 `json:"startedDate"`
QueuedDate int64 `json:"queuedDate"`
ExecutedDate int64 `json:"executedDate"`
FinishedDate int64 `json:"finishedDate"`
ReasonSummary string `json:"reasonSummary"`
Key ApiBambooDeployBuildKey `json:"key"`
Agent ApiBambooDeployBuildAgent `json:"agent"`
Operations ApiBambooOperations `json:"operations"`
}
func (*ApiBambooDeployBuild) Convert ¶
func (api *ApiBambooDeployBuild) Convert(op *BambooOptions) *BambooDeployBuild
type ApiBambooDeployBuildKey ¶
type ApiBambooDeployBuildKey struct {
Key string `json:"key"`
EntityKey ApiBambooKey `json:"entityKey"`
ResultNumber uint64 `json:"resultNumber"`
}
type ApiBambooDeployProject ¶
type ApiBambooDeployProject struct {
ID uint64 `json:"id"`
OID string `json:"oid"`
Key ApiBambooKey `json:"key"`
Name string `json:"name"`
PlanKey ApiBambooKey `json:"planKey"`
Description string `json:"description"`
Environments []ApiBambooEnvironment `json:"environments"`
Operations ApiBambooOperations `json:"operations"`
}
type ApiBambooDeploymentVersion ¶
type ApiBambooDeploymentVersion struct {
ID uint64 `json:"id"`
Name string `json:"name"`
CreationDate *time.Time `json:"creationDate"`
CreatorUserName string `json:"creatorUserName"`
Items []interface{} `json:"items"`
Operations ApiBambooOperations `json:"operations"`
CreatorDisplayName string `json:"creatorDisplayName"`
CreatorGravatarUrl string `json:"creatorGravatarUrl"`
PlanBranchName string `json:"planBranchName"`
AgeZeroPoint uint64 `json:"ageZeroPoint"`
}
type ApiBambooEnvironment ¶
type ApiBambooEnvironment struct {
ID uint64 `json:"id"`
Key ApiBambooKey `json:"key"`
Name string `json:"name"`
Description string `json:"description"`
DeploymentProjectId uint64 `json:"deploymentProjectId"`
Operations ApiBambooOperations `json:"operations"`
Position uint64 `json:"position"`
ConfigurationState string `json:"configurationState"`
}
type ApiBambooJob ¶
type ApiBambooJob struct {
Id string `json:"id"`
Type string `json:"type"`
SearchEntity struct {
Id string `json:"id"`
Key string `json:"key"`
ProjectName string `json:"projectName"`
PlanName string `json:"planName"`
BranchName string `json:"branchName"`
StageName string `json:"stageName"`
JobName string `json:"jobName"`
Description string `json:"description"`
Type string `json:"type"`
} `json:"searchEntity"`
}
func (*ApiBambooJob) Convert ¶
func (apiRes *ApiBambooJob) Convert() *BambooJob
type ApiBambooJobBuild ¶
type ApiBambooJobBuild ApiBambooPlanBuild
func (*ApiBambooJobBuild) Convert ¶
func (apiRes *ApiBambooJobBuild) Convert() *BambooJobBuild
type ApiBambooKey ¶
type ApiBambooKey struct {
Key string `json:"key"`
}
type ApiBambooLink ¶
type ApiBambooOperations ¶
type ApiBambooOperations struct {
CanView bool `json:"canView"`
CanEdit bool `json:"canEdit"`
CanDelete bool `json:"canDelete"`
AllowedToExecute bool `json:"allowedToExecute"`
CanExecute bool `json:"canExecute"`
AllowedToCreateVersion bool `json:"allowedToCreateVersion"`
AllowedToSetVersionStatus bool `json:"allowedToSetVersionStatus"`
}
type ApiBambooPlan ¶
type ApiBambooPlan struct {
Expand string `json:"expand"`
Description string `json:"description"`
ShortName string `json:"shortName"`
BuildName string `json:"buildName"`
ShortKey string `json:"shortKey"`
Type string `json:"type"`
Enabled bool `json:"enabled"`
ProjectKey string `json:"projectKey"`
ProjectName string `json:"projectName"`
ApiBambooLink `json:"link"`
IsFavourite bool `json:"isFavourite"`
IsActive bool `json:"isActive"`
IsBuilding bool `json:"isBuilding"`
AverageBuildTimeInSeconds float64 `json:"averageBuildTimeInSeconds"`
Key string `json:"key"`
Name string `json:"name"`
}
func (*ApiBambooPlan) Convert ¶
func (apiRes *ApiBambooPlan) Convert() *BambooPlan
type ApiBambooPlanBuild ¶
type ApiBambooPlanBuild struct {
Expand string `json:"expand"`
PlanName string `json:"planName"`
ProjectName string `json:"projectName"`
BuildResultKey string `json:"buildResultKey"`
LifeCycleState string `json:"lifeCycleState"`
Id int `json:"id"`
BuildStartedTime *time.Time `json:"buildStartedTime"`
PrettyBuildStartedTime string `json:"prettyBuildStartedTime"`
BuildCompletedTime *time.Time `json:"buildCompletedTime"`
BuildCompletedDate *time.Time `json:"buildCompletedDate"`
PrettyBuildCompletedTime string `json:"prettyBuildCompletedTime"`
BuildDurationInSeconds int `json:"buildDurationInSeconds"`
BuildDuration int `json:"buildDuration"`
BuildDurationDescription string `json:"buildDurationDescription"`
BuildRelativeTime string `json:"buildRelativeTime"`
VcsRevisionKey string `json:"vcsRevisionKey"`
VcsRevisions struct {
Size int `json:"size"`
Expand string `json:"expand"`
VcsRevision []struct {
RepositoryId int `json:"repositoryId"`
RepositoryName string `json:"repositoryName"`
VcsRevisionKey string `json:"vcsRevisionKey"`
} `json:"vcsRevision"`
StartIndex int `json:"start-index"`
MaxResult int `json:"max-result"`
} `json:"vcsRevisions"`
BuildTestSummary string `json:"buildTestSummary"`
SuccessfulTestCount int `json:"successfulTestCount"`
FailedTestCount int `json:"failedTestCount"`
QuarantinedTestCount int `json:"quarantinedTestCount"`
SkippedTestCount int `json:"skippedTestCount"`
Continuable bool `json:"continuable"`
OnceOff bool `json:"onceOff"`
Restartable bool `json:"restartable"`
NotRunYet bool `json:"notRunYet"`
Finished bool `json:"finished"`
Successful bool `json:"successful"`
BuildReason string `json:"buildReason"`
ReasonSummary string `json:"reasonSummary"`
Key string `json:"key"`
PlanResultKey struct {
Key string `json:"key"`
EntityKey struct {
Key string `json:"key"`
} `json:"entityKey"`
ResultNumber int `json:"resultNumber"`
} `json:"planResultKey"`
State string `json:"state"`
BuildState string `json:"buildState"`
Number int `json:"number"`
BuildNumber int `json:"buildNumber"`
Parent `json:"parent"`
}
func (*ApiBambooPlanBuild) Convert ¶
func (apiRes *ApiBambooPlanBuild) Convert() *BambooPlanBuild
type ApiBambooPlans ¶
type ApiBambooPlans struct {
ApiBambooSizeData `json:"squash"`
Plan []json.RawMessage `json:"plan"`
}
type ApiBambooProject ¶
type ApiBambooProject struct {
Key string `json:"key"`
Expand string `json:"expand"`
Name string `json:"name"`
Description string `json:"description"`
Link ApiBambooLink `json:"link"`
Plans ApiBambooPlans `json:"plans"`
}
func (ApiBambooProject) ConvertApiScope ¶
func (apiProject ApiBambooProject) ConvertApiScope() plugin.ToolLayerScope
type ApiBambooProjectResponse ¶
type ApiBambooProjectResponse struct {
Expand string `json:"expand"`
Link ApiBambooLink `json:"link"`
Projects ApiBambooProjects `json:"projects"`
}
type ApiBambooProjects ¶
type ApiBambooProjects struct {
ApiBambooSizeData `json:"squash"`
Expand string `json:"expand"`
Link ApiBambooLink `json:"link"`
Projects []ApiBambooProject `json:"project"`
}
type ApiBambooSearchProjectResponse ¶
type ApiBambooSearchProjectResponse struct {
ApiBambooSizeData `json:"squash"`
SearchResults []ApiSearchResultProjects `json:"searchResults"`
}
type ApiBambooServerInfo ¶
type ApiBambooSizeData ¶
type ApiRepository ¶
type ApiSearchEntityProject ¶
type ApiSearchResultProjects ¶
type ApiSearchResultProjects struct {
Id string `json:"id"`
Type string `json:"type"`
SearchEntity ApiSearchEntityProject `json:"searchResults"`
}
type BambooApiParams ¶
type BambooConn ¶
type BambooConn struct {
api.RestConnection `mapstructure:",squash"`
//TODO you may need to use helper.BasicAuth instead of helper.AccessToken
api.BasicAuth `mapstructure:",squash"`
}
TODO Please modify the following code to fit your needs This object conforms to what the frontend currently sends.
func (*BambooConn) PrepareApiClient ¶
func (conn *BambooConn) PrepareApiClient(apiClient apihelperabstract.ApiClientAbstract) errors.Error
PrepareApiClient test api and set the IsPrivateToken,version,UserId and so on.
type BambooConnection ¶
type BambooConnection struct {
api.BaseConnection `mapstructure:",squash"`
BambooConn `mapstructure:",squash"`
}
func (BambooConnection) TableName ¶
func (BambooConnection) TableName() string
type BambooDeployBuild ¶
type BambooDeployBuild struct {
ConnectionId uint64 `json:"connection_id" gorm:"primaryKey"`
DeployBuildId uint64 `json:"deploy_build_id" gorm:"primaryKey"`
DeploymentVersionName string `json:"deploymentVersionName"`
DeploymentState string `json:"deploymentState"`
LifeCycleState string `json:"lifeCycleState"`
StartedDate *time.Time `json:"startedDate"`
QueuedDate *time.Time `json:"queuedDate"`
ExecutedDate *time.Time `json:"executedDate"`
FinishedDate *time.Time `json:"finishedDate"`
ReasonSummary string `json:"reasonSummary"`
ProjectKey string `json:"project_key" gorm:"index"`
PlanKey string `json:"plan_key" gorm:"index"`
Environment string `gorm:"type:varchar(255)"`
ApiBambooOperations
common.NoPKModel
}
func (BambooDeployBuild) TableName ¶
func (BambooDeployBuild) TableName() string
type BambooDeployEnvironment ¶
type BambooDeployEnvironment struct {
ConnectionId uint64 `json:"connection_id" gorm:"primaryKey"`
EnvId uint64 `json:"env_id" gorm:"primaryKey"`
EnvKey string `json:"key" gorm:"index"`
Name string `json:"name" gorm:"index"`
PlanKey string `json:"plan_key" gorm:"index"`
ProjectKey string `json:"project_key" gorm:"index"`
Description string `json:"description"`
DeploymentProjectId uint64 `json:"deploymentProjectId"`
Position uint64 `json:"position"`
ConfigurationState string `json:"configurationState"`
ApiBambooOperations
common.NoPKModel
}
func (*BambooDeployEnvironment) Convert ¶
func (b *BambooDeployEnvironment) Convert(apiEnv *ApiBambooEnvironment)
func (BambooDeployEnvironment) TableName ¶
func (BambooDeployEnvironment) TableName() string
type BambooJob ¶
type BambooJob struct {
ConnectionId uint64 `gorm:"primaryKey"`
JobKey string `gorm:"primaryKey"`
Id string
Name string `json:"name"`
PlanKey string `json:"planKey"`
PlanName string `json:"planName"`
ProjectKey string `gorm:"index"`
ProjectName string `json:"projectName"`
Description string `json:"description"`
BranchName string `json:"branchName"`
StageName string `json:"stageName"`
Type string `json:"type"`
common.NoPKModel
}
type BambooJobBuild ¶
type BambooJobBuild struct {
ConnectionId uint64 `gorm:"primaryKey"`
JobBuildKey string `gorm:"primaryKey"`
PlanBuildKey string `gorm:"index"`
Expand string `json:"expand"`
Number int `json:"number"`
BuildNumber int `json:"buildNumber"`
JobName string `gorm:"index"`
JobKey string `gorm:"index"`
PlanName string `gorm:"index"`
PlanKey string `gorm:"index"`
ProjectName string `gorm:"index"`
ProjectKey string `gorm:"index"`
BuildResultKey string `json:"buildResultKey"`
LifeCycleState string `json:"lifeCycleState"`
BuildStartedTime *time.Time `json:"buildStartedTime"`
PrettyBuildStartedTime string `json:"prettyBuildStartedTime"`
BuildCompletedTime *time.Time `json:"buildCompletedTime"`
BuildCompletedDate *time.Time `json:"buildCompletedDate"`
PrettyBuildCompletedTime string `json:"prettyBuildCompletedTime"`
BuildDurationInSeconds int `json:"buildDurationInSeconds"`
BuildDuration int `json:"buildDuration"`
BuildDurationDescription string `json:"buildDurationDescription"`
BuildRelativeTime string `json:"buildRelativeTime"`
VcsRevisionKey string `json:"vcsRevisionKey"`
BuildTestSummary string `json:"buildTestSummary"`
SuccessfulTestCount int `json:"successfulTestCount"`
FailedTestCount int `json:"failedTestCount"`
QuarantinedTestCount int `json:"quarantinedTestCount"`
SkippedTestCount int `json:"skippedTestCount"`
Continuable bool `json:"continuable"`
OnceOff bool `json:"onceOff"`
Restartable bool `json:"restartable"`
NotRunYet bool `json:"notRunYet"`
Finished bool `json:"finished"`
Successful bool `json:"successful"`
BuildReason string `json:"buildReason"`
ReasonSummary string `json:"reasonSummary"`
State string `json:"state"`
BuildState string `json:"buildState"`
Type string `gorm:"type:varchar(255)"`
Environment string `gorm:"type:varchar(255)"`
JobResultKey string
common.NoPKModel
}
func (BambooJobBuild) TableName ¶
func (BambooJobBuild) TableName() string
type BambooOptions ¶
type BambooOptions struct {
// TODO add some custom options here if necessary
// options means some custom params required by plugin running.
// Such As How many rows do your want
// You can use it in sub tasks and you need pass it in main.go and pipelines.
ConnectionId uint64 `json:"connectionId"`
ProjectKey string `json:"projectKey"`
Tasks []string `json:"tasks,omitempty"`
ScopeConfigId uint64 `mapstructure:"scopeConfigId" json:"scopeConfigId"`
*BambooScopeConfig `mapstructure:"scopeConfig" json:"scopeConfig"`
}
type BambooPlan ¶
type BambooPlan struct {
ConnectionId uint64 `gorm:"primaryKey"`
PlanKey string `json:"planKey" gorm:"primaryKey"`
Name string `json:"name"`
Expand string `json:"expand"`
ProjectKey string `json:"projectKey" gorm:"index"`
ProjectName string `json:"projectName"`
Description string `json:"description"`
ShortName string `json:"shortName"`
BuildName string `json:"buildName"`
ShortKey string `json:"shortKey"`
Type string `json:"type"`
Enabled bool `json:"enabled"`
Href string `json:"href"`
Rel string `json:"rel"`
IsFavourite bool `json:"isFavourite"`
IsActive bool `json:"isActive"`
IsBuilding bool `json:"isBuilding"`
AverageBuildTimeInSeconds float64 `json:"averageBuildTimeInSeconds"`
common.NoPKModel
}
func (BambooPlan) TableName ¶
func (BambooPlan) TableName() string
type BambooPlanBuild ¶
type BambooPlanBuild struct {
ConnectionId uint64 `gorm:"primaryKey"`
PlanBuildKey string `gorm:"primaryKey"`
Expand string `json:"expand"`
Number int `json:"number"`
BuildNumber int `json:"buildNumber"`
PlanName string `json:"planName"`
PlanKey string
ProjectName string `json:"projectName"`
ProjectKey string
BuildResultKey string `json:"buildResultKey"`
LifeCycleState string `json:"lifeCycleState"`
BuildStartedTime *time.Time `json:"buildStartedTime"`
PrettyBuildStartedTime string `json:"prettyBuildStartedTime"`
BuildCompletedTime *time.Time `json:"buildCompletedTime"`
BuildCompletedDate *time.Time `json:"buildCompletedDate"`
PrettyBuildCompletedTime string `json:"prettyBuildCompletedTime"`
BuildDurationInSeconds int `json:"buildDurationInSeconds"`
BuildDuration int `json:"buildDuration"`
BuildDurationDescription string `json:"buildDurationDescription"`
BuildRelativeTime string `json:"buildRelativeTime"`
VcsRevisionKey string `json:"vcsRevisionKey"`
BuildTestSummary string `json:"buildTestSummary"`
SuccessfulTestCount int `json:"successfulTestCount"`
FailedTestCount int `json:"failedTestCount"`
QuarantinedTestCount int `json:"quarantinedTestCount"`
SkippedTestCount int `json:"skippedTestCount"`
Continuable bool `json:"continuable"`
OnceOff bool `json:"onceOff"`
Restartable bool `json:"restartable"`
NotRunYet bool `json:"notRunYet"`
Finished bool `json:"finished"`
Successful bool `json:"successful"`
BuildReason string `json:"buildReason"`
ReasonSummary string `json:"reasonSummary"`
State string `json:"state"`
BuildState string `json:"buildState"`
Type string `gorm:"type:varchar(255)"`
Environment string `gorm:"type:varchar(255)"`
PlanResultKey string
common.NoPKModel
}
func (BambooPlanBuild) TableName ¶
func (BambooPlanBuild) TableName() string
type BambooPlanBuildVcsRevision ¶
type BambooPlanBuildVcsRevision struct {
ConnectionId uint64 `gorm:"primaryKey"`
PlanBuildKey string `gorm:"primaryKey"`
RepositoryId int
RepositoryName string `json:"repositoryName"`
VcsRevisionKey string `gorm:"primaryKey"`
common.NoPKModel
}
func (BambooPlanBuildVcsRevision) TableName ¶
func (BambooPlanBuildVcsRevision) TableName() string
type BambooProject ¶
type BambooProject struct {
ConnectionId uint64 `json:"connectionId" mapstructure:"connectionId" validate:"required" gorm:"primaryKey"`
ProjectKey string `json:"projectKey" gorm:"primaryKey;type:varchar(256)" validate:"required"`
ScopeConfigId uint64 `json:"scopeConfigId,omitempty" mapstructure:"scopeConfigId"`
Name string `json:"name" gorm:"index;type:varchar(256)"`
Description string `json:"description"`
Href string `json:"link"`
Rel string `json:"rel" gorm:"type:varchar(100)"`
common.NoPKModel `json:"-" mapstructure:"-"`
}
func (BambooProject) ScopeId ¶
func (p BambooProject) ScopeId() string
func (BambooProject) ScopeName ¶
func (p BambooProject) ScopeName() string
func (BambooProject) ScopeParams ¶
func (p BambooProject) ScopeParams() interface{}
func (BambooProject) TableName ¶
func (BambooProject) TableName() string
type BambooResponse ¶
type BambooResponse struct {
Name string `json:"name"`
ID int `json:"id"`
BambooConnection
}
This object conforms to what the frontend currently expects.
type BambooScopeConfig ¶
type BambooScopeConfig struct {
common.ScopeConfig `mapstructure:",squash" json:",inline" gorm:"embedded"`
ConnectionId uint64 `mapstructure:"connectionId" json:"connectionId"`
Name string `gorm:"type:varchar(255);index:idx_name_gitlab,unique" validate:"required" mapstructure:"name" json:"name"`
// should be {realRepoName: [bamboo_repoId]}
RepoMap datatypes.JSONMap
DeploymentPattern string `mapstructure:"deploymentPattern,omitempty" json:"deploymentPattern" gorm:"type:varchar(255)"`
ProductionPattern string `mapstructure:"productionPattern,omitempty" json:"productionPattern" gorm:"type:varchar(255)"`
}
func (BambooScopeConfig) TableName ¶
func (BambooScopeConfig) TableName() string
Source Files
¶
Click to show internal directories.
Click to hide internal directories.