Documentation ¶
Overview ¶
Copyright 2021 The CD Events SDK Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func CreateArtifactEvent(eventType CDEventType, params ArtifactEventParams) (cloudevents.Event, error)
- func CreateBranchEvent(eventType CDEventType, branchId string, branchName string, ...) (cloudevents.Event, error)
- func CreateBuildEvent(eventType CDEventType, buildId string, buildName string, ...) (cloudevents.Event, error)
- func CreateEnvironmentEvent(eventType CDEventType, envId string, envName string, envRepoUrl string, ...) (cloudevents.Event, error)
- func CreatePipelineRunEvent(eventType CDEventType, pipelineRunId string, pipelineRunName string, ...) (cloudevents.Event, error)
- func CreateRepositoryEvent(eventType CDEventType, repositoryId string, repositoryName string, ...) (cloudevents.Event, error)
- func CreateServiceEvent(eventType CDEventType, serviceEnvId string, serviceName string, ...) (cloudevents.Event, error)
- func CreateTaskRunEvent(eventType CDEventType, taskRunId string, taskRunName string, ...) (cloudevents.Event, error)
- type ArtifactEventParams
- type CDEventType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateArtifactEvent ¶
func CreateArtifactEvent(eventType CDEventType, params ArtifactEventParams) (cloudevents.Event, error)
func CreateBranchEvent ¶
func CreateBranchEvent(eventType CDEventType, branchId string, branchName string, branchRepositoryId string, branchData map[string]string) (cloudevents.Event, error)
func CreateBuildEvent ¶
func CreateBuildEvent(eventType CDEventType, buildId string, buildName string, buildArtifactId string, buildData map[string]string) (cloudevents.Event, error)
func CreateEnvironmentEvent ¶
func CreateEnvironmentEvent(eventType CDEventType, envId string, envName string, envRepoUrl string, envData map[string]string) (cloudevents.Event, error)
func CreatePipelineRunEvent ¶
func CreateRepositoryEvent ¶
func CreateRepositoryEvent(eventType CDEventType, repositoryId string, repositoryName string, repositoryURL string, repositoryData map[string]string) (cloudevents.Event, error)
func CreateServiceEvent ¶
func CreateServiceEvent(eventType CDEventType, serviceEnvId string, serviceName string, serviceVersion string, serviceData map[string]string) (cloudevents.Event, error)
func CreateTaskRunEvent ¶
func CreateTaskRunEvent(eventType CDEventType, taskRunId string, taskRunName string, taskRunPipelineId string, taskRunData map[string]string) (cloudevents.Event, error)
Types ¶
type ArtifactEventParams ¶
type CDEventType ¶
type CDEventType string
const ( // PipelineRun events PipelineRunStartedEventV1 CDEventType = "cd.pipelinerun.started.v1" PipelineRunFinishedEventV1 CDEventType = "cd.pipelinerun.finished.v1" PipelineRunQueuedEventV1 CDEventType = "cd.pipelinerun.queued.v1" // TaskRun events TaskRunStartedEventV1 CDEventType = "cd.taskrun.started.v1" TaskRunFinishedEventV1 CDEventType = "cd.taskrun.finished.v1" // Repository events RepositoryCreatedEventV1 CDEventType = "cd.repository.created.v1" RepositoryModifiedEventV1 CDEventType = "cd.repository.modified.v1" RepositoryDeletedEventV1 CDEventType = "cd.repository.deleted.v1" BranchCreatedEventV1 CDEventType = "cd.repository.branch.created.v1" BranchDeletedEventV1 CDEventType = "cd.repository.branch.deleted.v1" // Change Events ChangeCreatedEventV1 CDEventType = "cd.repository.change.created.v1" ChangeUpdatedEventV1 CDEventType = "cd.repository.change.updated.v1" ChangeReviewedEventV1 CDEventType = "cd.repository.change.reviewed.v1" ChangeMergedEventV1 CDEventType = "cd.repository.change.merged.v1" ChangeAbandonedEventV1 CDEventType = "cd.repository.change.abandoned.v1" // Build Events BuildStartedEventV1 CDEventType = "cd.build.started.v1" BuildQueuedEventV1 CDEventType = "cd.build.queued.v1" BuildFinishedEventV1 CDEventType = "cd.build.finished.v1" // Test Events TestCaseStartedEventV1 CDEventType = "cd.test.case.started.v1" TestCaseQueuedEventV1 CDEventType = "cd.test.case.queued.v1" TestCaseFinishedEventV1 CDEventType = "cd.test.case.finished.v1" TestSuiteStartedEventV1 CDEventType = "cd.test.suite.started.v1" TestSuiteQueuedEventV1 CDEventType = "cd.test.suite.queued.v1" TestSuiteFinishedEventV1 CDEventType = "cd.test.suite.finished.v1" // Artifact Events ArtifactPackagedEventV1 CDEventType = "cd.artifact.packaged.v1" ArtifactPublishedEventV1 CDEventType = "cd.artifact.published.v1" // Environment Events EnvironmentCreatedEventV1 CDEventType = "cd.environment.created.v1" EnvironmentModifiedEventV1 CDEventType = "cd.environment.modified.v1" EnvironmentDeletedEventV1 CDEventType = "cd.environment.deleted.v1" // Service Events ServiceDeployedEventV1 CDEventType = "cd.service.deployed.v1" ServiceUpgradedEventV1 CDEventType = "cd.service.upgraded.v1" ServiceRolledbackEventV1 CDEventType = "cd.service.rolledback.v1" ServiceRemovedEventV1 CDEventType = "cd.service.removed.v1" )
func (CDEventType) String ¶
func (t CDEventType) String() string
Click to show internal directories.
Click to hide internal directories.