Versions in this module Expand all Collapse all v0 v0.2.0 Oct 24, 2024 Changes in this version + const APIFeedPipelineEndpoint + const APIJobFeedEndpoint + const AdminOperationStateEndpoint + const AgentProfileEndpoint + const AgentsEndpoint + const ArtifactInfoEndpoint + const ArtifactStoreEndpoint + const AuthConfigEndpoint + const BackupConfigEndpoint + const BackupStatsEndpoint + const ClusterProfileEndpoint + const ConfigReposEndpoint + const ConfigReposInternalEndpoint + const ContentJSON + const CurrentUserEndpoint + const DefaultTimeoutEndpoint + const ElasticProfileUsageEndpoint + const EncryptEndpoint + const EnvironmentEndpoint + const EnvironmentInternalEndpoint + const HeaderConfirm + const HeaderVersionEleven + const HeaderVersionFour + const HeaderVersionOne + const HeaderVersionSeven + const HeaderVersionThree + const HeaderVersionTwo + const HeaderVersionZero + const HealthEndpoint + const JobRunHistoryEndpoint + const JobsAPIEndpoint + const LastXPipelineScheduledDates + const LocationHeader + const MailServerConfigEndpoint + const MaintenanceEndpoint + const MaterialEndpoint + const MaterialNotifyEndpoint + const MaterialTriggerUpdate + const MaterialUsageEndpoint + const PackageRepositoriesEndpoint + const PackagesEndpoint + const PermissionsEndpoint + const PipelineConfigEndpoint + const PipelineExportEndpoint + const PipelineGroupEndpoint + const PipelinePrefix + const PipelineStatus + const PipelineSuffix + const PipelinesEndpoint + const PluginInfoEndpoint + const PluginSettingsEndpoint + const PreflightCheckEndpoint + const RolesEndpoint + const SecretsConfigEndpoint + const ServerHealthEndpoint + const SiteURLEndpoint + const StageEndpoint + const SystemAdminEndpoint + const UsersEndpoint + const VSMEndpoint + const VersionEndpoint + func APIErrorWithBody(body string, code int) error + func APIWithCodeError(code int) error + func GetGoCDMethodNames() []string + func GetPipelineName(link string) (string, error) + func GetSLice(values interface{}) []string + func ResponseReadError(msg string) error + type AddRemoves struct + Add []string + Remove []string + type Agent struct + BuildDetails BuildInfo + BuildState string + ConfigState string + CurrentState string + DiskSpaceAvailable interface{} + ElasticAgentID string + ElasticPluginID string + Environments any + ID string + IPAddress string + Name string + OS string + Operations Operations + Resources []string + Sandbox string + UUIDS []string + Version string + type AgentJobHistory struct + Jobs []JobRunHistory + Pagination Pagination + type Agents struct + Config []Agent + type AgentsConfig struct + Config Agents + type ArtifactInfo struct + ArtifactsDir string + ETAG string + PurgeSettings PurgeSettings + type ArtifactStoresConfig struct + CommonConfigs []CommonConfig + ETAG string + type ArtifactStoresConfigs struct + ArtifactStoresConfigs ArtifactStoresConfig + type Attribute struct + AutoUpdate bool + Branch string + CheckExternals bool + Destination string + Domain string + EncryptedPassword string + Filter struct{ ... } + IgnoreForScheduling bool + InvertFilter bool + Name string + Origin map[string]string + Password string + Pipeline string + Port string + ProjectPath string + Ref string + ShallowClone bool + Stage string + SubmoduleFolder string + URL string + UseTickets bool + Username string + View string + type Auth struct + BearerToken string + NoAuth bool + Password string + UserName string + type AuthConfigs struct + Config struct{ ... } + type AuthorizationConfig struct + Roles []string + Users []string + type BackupConfig struct + EmailOnFailure bool + EmailOnSuccess bool + PostBackupScript string + Schedule string + type BackupStats struct + Message string + Path string + ProgressStatus string + Status string + Time string + type BuildInfo struct + Job string + Pipeline string + Stage string + type CommonConfig struct + AllowOnlyKnownUsers bool + ClusterProfileID string + Description string + ETAG string + ID string + Name string + PluginID string + Properties []PluginConfiguration + Rules []map[string]string + type ConfigRepo struct + ConfigRepoParseInfo ConfigRepoParseInfo + Configuration []PluginConfiguration + ETAG string + Environments []Environment + Groups []PipelineGroup + ID string + Material Material + PluginID string + Rules []map[string]string + type ConfigRepoConfig struct + ConfigRepos ConfigRepos + type ConfigRepoParseInfo struct + Error string + GoodModification map[string]interface{} + LatestParsedModification map[string]interface{} + type ConfigRepos struct + ConfigRepos []ConfigRepo + type ElasticProfileUsage struct + JobName string + PipelineConfigOrigin string + PipelineName string + StageName string + type Encrypted struct + EncryptedValue string + type EntityPermissions struct + Administer []string + View []string + type EnvVars struct + EncryptedValue string + Name string + Secure bool + Value string + type Environment struct + ETAG string + EnvVars []EnvVars + Name string + Origins []EnvironmentOrigin + Pipelines []Pipeline + type EnvironmentInfo struct + Environments Environments + type EnvironmentOrigin struct + ID string + Type string + type Environments struct + Environments []Environment + type GoCd interface + AgentKillTask func(agent Agent) error + BulkDeleteUsers func(users map[string]interface{}) error + BulkEnableDisableUsers func(users map[string]interface{}) error + CancelStage func(stage Stage) (string, error) + CommentOnPipeline func(comment PipelineObject) error + ConfigRepoPreflightCheck func(pipelines map[string]string, pluginID string, repoID string) (bool, error) + ConfigRepoStatus func(repo string) (map[string]bool, error) + ConfigRepoTriggerUpdate func(name string) (map[string]string, error) + CreateArtifactStore func(config CommonConfig) (CommonConfig, error) + CreateAuthConfig func(config CommonConfig) (CommonConfig, error) + CreateClusterProfile func(config CommonConfig) (CommonConfig, error) + CreateConfigRepo func(repoObj ConfigRepo) error + CreateElasticAgentProfile func(config CommonConfig) (CommonConfig, error) + CreateEnvironment func(environment Environment) error + CreateOrUpdateBackupConfig func(backup BackupConfig) error + CreateOrUpdateMailServerConfig func(mailConfig MailServerConfig) (MailServerConfig, error) + CreateOrUpdateSiteURL func(SiteURLConfig) (SiteURLConfig, error) + CreatePackage func(config Package) (Package, error) + CreatePackageRepository func(config PackageRepository) (PackageRepository, error) + CreatePipeline func(config PipelineConfig) (PipelineConfig, error) + CreatePipelineGroup func(group PipelineGroup) error + CreatePluginSettings func(settings PluginSettings) (PluginSettings, error) + CreateRole func(config Role) (Role, error) + CreateSecretConfig func(config CommonConfig) (CommonConfig, error) + CreateUser func(user User) (User, error) + DecryptText func(value, cipherKey string) (string, error) + DeleteAgent func(id string) (string, error) + DeleteAgentBulk func(agent Agent) (string, error) + DeleteArtifactStore func(name string) error + DeleteAuthConfig func(name string) error + DeleteBackupConfig func() error + DeleteClusterProfile func(name string) error + DeleteConfigRepo func(repo string) error + DeleteElasticAgentProfile func(name string) error + DeleteEnvironment func(name string) error + DeleteMailServerConfig func() error + DeletePackage func(id string) error + DeletePackageRepository func(id string) error + DeletePipeline func(name string) error + DeletePipelineGroup func(name string) error + DeleteRole func(name string) error + DeleteSecretConfig func(id string) error + DeleteUser func(user string) error + DisableMaintenanceMode func() error + EnableMaintenanceMode func() error + EncryptText func(value string) (Encrypted, error) + ExportPipelineToConfigRepoFormat func(pipelineName, pluginID string) (PipelineExport, error) + ExtractTemplatePipeline func(pipeline, template string) (PipelineConfig, error) + GetAgent func(agentID string) (Agent, error) + GetAgentJobRunHistory func(agent string) (AgentJobHistory, error) + GetAgents func() ([]Agent, error) + GetArtifactConfig func() (ArtifactInfo, error) + GetArtifactStore func(name string) (CommonConfig, error) + GetArtifactStores func() (ArtifactStoresConfig, error) + GetAuthConfig func(name string) (CommonConfig, error) + GetAuthConfigs func() ([]CommonConfig, error) + GetBackup func(ID string) (BackupStats, error) + GetBackupConfig func() (BackupConfig, error) + GetClusterProfile func(name string) (CommonConfig, error) + GetClusterProfiles func() (ProfilesConfig, error) + GetConfigRepo func(repo string) (ConfigRepo, error) + GetConfigRepoDefinitions func(repo string) (ConfigRepo, error) + GetConfigRepos func() ([]ConfigRepo, error) + GetConfigReposInternal func() ([]ConfigRepo, error) + GetCurrentUser func() (User, error) + GetDefaultJobTimeout func() (map[string]string, error) + GetElasticAgentProfile func(name string) (CommonConfig, error) + GetElasticAgentProfileUsage func(profileID string) ([]ElasticProfileUsage, error) + GetElasticAgentProfiles func() (ProfilesConfig, error) + GetEnvironment func(name string) (Environment, error) + GetEnvironments func() ([]Environment, error) + GetEnvironmentsMerged func(names []string) ([]Environment, error) + GetLimitedPipelineRunHistory func(pipeline, pageSize, after string) ([]PipelineRunHistory, error) + GetMailServerConfig func() (MailServerConfig, error) + GetMaintenanceModeInfo func() (Maintenance, error) + GetMaterialUsage func(materialID string) ([]string, error) + GetMaterials func() ([]Material, error) + GetPackage func(id string) (Package, error) + GetPackageRepositories func() ([]PackageRepository, error) + GetPackageRepository func(id string) (PackageRepository, error) + GetPackages func() ([]Package, error) + GetPermissions func(query map[string]string) (Permission, error) + GetPipelineConfig func(name string) (PipelineConfig, error) + GetPipelineFiles func(path string, pipelines []string, patterns ...string) ([]PipelineFiles, error) + GetPipelineGroup func(name string) (PipelineGroup, error) + GetPipelineGroups func() ([]PipelineGroup, error) + GetPipelineInstance func(pipeline PipelineObject) (map[string]interface{}, error) + GetPipelineRunHistory func(pipeline, pageSize string, delay time.Duration) ([]PipelineRunHistory, error) + GetPipelineSchedules func(pipeline, start, perPage string) (PipelineSchedules, error) + GetPipelineState func(pipeline string) (PipelineState, error) + GetPipelineVSM func(pipeline, instance string) (VSM, error) + GetPipelines func() (PipelinesInfo, error) + GetPluginInfo func(name string) (Plugin, error) + GetPluginSettings func(name string) (PluginSettings, error) + GetPluginsInfo func() (PluginsInfo, error) + GetRole func(name string) (Role, error) + GetRoles func() (RolesConfig, error) + GetRolesByType func(roleType string) (RolesConfig, error) + GetScheduledJobs func() (ScheduledJobs, error) + GetSecretConfig func(id string) (CommonConfig, error) + GetSecretConfigs func() (SecretsConfig, error) + GetServerHealth func() (map[string]string, error) + GetServerHealthMessages func() ([]ServerHealth, error) + GetSiteURL func() (SiteURLConfig, error) + GetSystemAdmins func() (SystemAdmins, error) + GetUser func(user string) (User, error) + GetUsers func() ([]User, error) + GetVersionInfo func() (VersionInfo, error) + MaterialTriggerUpdate func(id string) (map[string]string, error) + NotifyMaterial func(material Material) (string, error) + PatchEnvironment func(environment any) (Environment, error) + PipelinePause func(name string, message any) error + PipelineUnPause func(name string) error + PipelineUnlock func(name string) error + RunFailedJobs func(stage Stage) (string, error) + RunJobs func(stage Stage) (string, error) + RunStage func(stage Stage) (string, error) + ScheduleBackup func() (map[string]string, error) + SchedulePipeline func(name string, schedule Schedule) error + SetPipelineFiles func(pipelines []PipelineFiles) map[string]string + SetRetryCount func(count int) + SetRetryWaitTime func(count int) + UpdateAgent func(agent Agent) error + UpdateAgentBulk func(agent Agent) error + UpdateArtifactConfig func(ArtifactInfo) (ArtifactInfo, error) + UpdateArtifactStore func(config CommonConfig) (CommonConfig, error) + UpdateAuthConfig func(config CommonConfig) (CommonConfig, error) + UpdateClusterProfile func(config CommonConfig) (CommonConfig, error) + UpdateConfigRepo func(repo ConfigRepo) (string, error) + UpdateCurrentUser func(user User) (User, error) + UpdateDefaultJobTimeout func(timeoutMinutes int) error + UpdateElasticAgentProfile func(config CommonConfig) (CommonConfig, error) + UpdateEnvironment func(environment Environment) (Environment, error) + UpdatePackage func(config Package) (Package, error) + UpdatePackageRepository func(config PackageRepository) (PackageRepository, error) + UpdatePipelineConfig func(config PipelineConfig) (PipelineConfig, error) + UpdatePipelineGroup func(group PipelineGroup) (PipelineGroup, error) + UpdatePluginSettings func(settings PluginSettings) (PluginSettings, error) + UpdateRole func(config Role) (Role, error) + UpdateSecretConfig func(config CommonConfig) (CommonConfig, error) + UpdateSystemAdmins func(data SystemAdmins) (SystemAdmins, error) + UpdateUser func(user User) (User, error) + ValidatePipelineSyntax func(pluginCfg plugin.Plugin, pipelines []string, fetchVersionFromServer bool) (bool, error) + func NewClient(baseURL string, auth Auth, logLevel string, caContent []byte) GoCd + type Groups []PipelineGroup + func (conf Groups) Count() int + type Job struct + BuildLocator string + Environment string + ID string + Name string + type JobRunHistory struct + JobName string + Name string + PipelineCounter int64 + Result string + StageCounter int64 + StageName string + type MailServerConfig struct + AdminEmail string + EncryptedPassword string + Hostname string + Port int64 + SenderEmail string + TLS bool + UserName string + type Maintenance struct + MaintenanceInfo struct{ ... } + type Material struct + Attributes Attribute + CanTriggerUpdate bool + Config MaterialConfig + Fingerprint string + MaterialUpdateInProgress bool + Messages []map[string]string + RepoURL string + Type string + type MaterialConfig struct + Attributes Attribute + Fingerprint string + Type string + type MaterialUsage struct + Usages []string + type Materials struct + Materials []Material + type Operations struct + Environments AddRemoves + Resources AddRemoves + type Package struct + AutoUpdate bool + Configuration []PluginConfiguration + ETAG string + PackageRepos CommonConfig + type PackageRepositories struct + Repositories struct{ ... } + type PackageRepository struct + Configuration []PluginConfiguration + ETAG string + ID string + Name string + Packages struct{ ... } + PluginMetaData map[string]string + type Packages struct + Packages struct{ ... } + type Pagination struct + Offset int64 + PageSize int64 + Total int64 + type PatchEnvironment struct + EnvVars struct{ ... } + Name string + Pipelines struct{ ... } + type Permission struct + ClusterProfile EntityPermissions + ConfigRepo EntityPermissions + ElasticAgentProfile EntityPermissions + Environment EntityPermissions + type Pipeline struct + Name string + type PipelineApprovalConfig struct + AllowOnlyOnSuccess bool + Authorization AuthorizationConfig + Type string + type PipelineArtifact struct + ArtifactID string + Configuration []map[string]string + Destination string + Source string + StoreID string + Type string + type PipelineBuildCause struct + Approver string + Message string + TriggerForced bool + type PipelineConfig struct + Config map[string]interface{} + CreateOptions PipelineCreateOptions + ETAG string + EnvironmentVariables []PipelineEnvironmentVariables + Group string + LabelTemplate string + LockBehavior string + Materials []Material + Name string + Origin PipelineOrigin + Parameters []PipelineEnvironmentVariables + Stages []PipelineStageConfig + Template string + Timer PipelineTimerConfig + TrackingTool PipelineTracingToolConfig + type PipelineCreateOptions struct + PausePipeline bool + PauseReason string + type PipelineEnvironmentVariables struct + EncryptedValue string + Name string + Secure bool + Value string + type PipelineExport struct + ETAG string + PipelineContent string + PipelineFileName string + PluginID string + type PipelineFiles struct + Name string + Path string + type PipelineGroup struct + Authorization PipelineGroupAuthorizationConfig + ETAG string + Name string + PipelineCount int + Pipelines []Pipeline + type PipelineGroupAuthorizationConfig struct + Admins AuthorizationConfig + Operate AuthorizationConfig + View AuthorizationConfig + type PipelineGroups struct + PipelineGroups []PipelineGroup + type PipelineGroupsConfig struct + PipelineGroups PipelineGroups + type PipelineHistory struct + Links map[string]interface{} + Pipelines []map[string]interface{} + type PipelineJobConfig struct + Artifacts []PipelineArtifact + ElasticProfileID string + EnvironmentVariables []PipelineEnvironmentVariables + Name string + Resources []string + RunInstanceCount interface{} + Tabs []PipelineTab + Tasks []PipelineTaskConfig + Timeout int + type PipelineLevels struct + Nodes []PipelineNode + type PipelineNode struct + Dependents []string + ID string + Name string + Parents []string + type PipelineObject struct + Counter int + Message string + Name string + type PipelineOrigin struct + ID string + Type string + type PipelineRunHistory struct + BuildCause PipelineBuildCause + Counter int + Name string + ScheduledDate float64 + type PipelineSchedules struct + Count int + Groups []PipelineSchedulesGroups + Name string + type PipelineSchedulesGroups struct + History []PipelineSchedulesHistory + type PipelineSchedulesHistory struct + BuildCause string + Label string + ModificationDate string + ScheduledDate string + ScheduledTimestamp int64 + type PipelineSize struct + Size float64 + Type string + type PipelineStageConfig struct + Approval PipelineApprovalConfig + CleanWorkingDirectory bool + EnvironmentVariables []PipelineEnvironmentVariables + FetchMaterials bool + Jobs []PipelineJobConfig + Name string + NeverCleanupArtifacts bool + type PipelineState struct + Locked bool + Name string + Paused bool + PausedBy string + PausedCause string + Schedulable bool + type PipelineTab struct + Name string + Path string + type PipelineTaskConfig struct + Attributes TaskAttributeConfig + Type string + type PipelineTemplateConfig struct + Name string + Stages []PipelineStageConfig + type PipelineTimerConfig struct + OnlyOnChanges bool + Spec string + type PipelineTracingToolConfig struct + Attributes struct{ ... } + Type string + type Pipelines struct + Pipelines []Pipeline + type PipelinesInfo struct + Link struct{ ... } + Pipeline []struct{ ... } + XMLName xml.Name + type Plugin struct + About map[string]interface{} + BundledPlugin bool + ETAG string + Extensions []PluginAttributes + ID string + PluginFileLocation string + Status PluginStatus + type PluginAttributes struct + ArtifactConfigSettings *PluginSettingAttribute + AuthConfigSettings *PluginSettingAttribute + ClusterProfileSettings *PluginSettingAttribute + DisplayName string + ElasticAgentProfileSettings *PluginSettingAttribute + FetchArtifactSettings *PluginSettingAttribute + PackageSettings *PluginSettingAttribute + PluginSettings *PluginSettingAttribute + RepositorySettings *PluginSettingAttribute + RoleSettings *PluginSettingAttribute + ScmSettings *PluginSettingAttribute + SecretConfigSettings *PluginSettingAttribute + StoreConfigSettings *PluginSettingAttribute + TaskSettings *PluginSettingAttribute + Type string + type PluginConfiguration struct + EncryptedValue string + IsSecure bool + Key string + Metadata map[string]interface{} + Value string + type PluginSettingAttribute struct + Configurations []PluginConfiguration + type PluginSettings struct + Configuration []PluginConfiguration + ETAG string + ID string + type PluginStatus struct + State string + type PluginsInfo struct + ETAG string + Plugins []Plugin + type PluginsInfos struct + PluginsInfos PluginsInfo + type ProfilesConfig struct + ClusterProfilesConfig []CommonConfig + CommonConfigs []CommonConfig + ETAG string + type ProfilesConfigs struct + ProfilesConfigs ProfilesConfig + type PurgeSettings struct + PurgeStartDiskSpace float64 + PurgeUptoDiskSpace float64 + type Role struct + Attributes RoleAttribute + AuthConfigID string + ETAG string + Name string + Policy []map[string]string + Properties []PluginConfiguration + Type string + type RoleAttribute struct + AuthConfigID string + Properties []PluginConfiguration + Users []string + type RolesConfig struct + ETAG string + Role []Role + type RolesConfigs struct + RolesConfigs RolesConfig + type Schedule struct + EnvVars []map[string]interface{} + Materials []map[string]interface{} + UpdateMaterial bool + type ScheduledJobs struct + Job []Job + type SecretsConfig struct + CommonConfigs []CommonConfig + ETAG string + type SecretsConfigs struct + SecretsConfigs SecretsConfig + type ServerHealth struct + Detail string + Level string + Message string + Time string + type ServerVersion struct + CommitURL string + FullVersion string + GitSha string + Version string + type SiteURLConfig struct + SecureSiteURL string + SiteURL string + type Stage struct + Jobs []string + Name string + Pipeline string + PipelineInstance string + StageCounter string + type SystemAdmins struct + ETAG string + Roles []string + Users []string + type TaskAttributeConfig struct + Arguments []string + ArtifactID string + ArtifactOrigin string + Command string + Configuration []PluginConfiguration + Destination string + IsSourceAFile bool + Job string + OnCancel struct{ ... } + Pipeline string + PluginConfiguration struct{ ... } + RunIf []string + Source string + Stage string + WorkingDirectory string + type User struct + Admin bool + CheckInAlias []string + EmailID string + EmailMe bool + Enabled bool + LoginName string + Name string + Roles []UserRole + type UserRole struct + Name string + Type string + type Users struct + GoCDUsers struct{ ... } + type VSM struct + Level []PipelineLevels + Pipeline string + type VersionInfo struct + FullVersion string + GitSHA string + Version string