diff --git a/.github/README.md b/.github/README.md index 2d448626..2ee22271 100644 --- a/.github/README.md +++ b/.github/README.md @@ -1,5 +1,8 @@ # types +> :warning: The types module is deprecated. +> Please use the types located in [go-vela/server](https://github.com/go-vela/server) + [![license](https://img.shields.io/crates/l/gl.svg)](../LICENSE) [![GoDoc](https://godoc.org/github.com/go-vela/types?status.svg)](https://godoc.org/github.com/go-vela/types) [![Go Report Card](https://goreportcard.com/badge/go-vela/types)](https://goreportcard.com/report/go-vela/types) diff --git a/constants/doc.go b/constants/doc.go index 0e748959..832ca770 100644 --- a/constants/doc.go +++ b/constants/doc.go @@ -2,7 +2,7 @@ // Package constants provides the defined constant types for Vela. // -// Usage: +// Deprecated: all constants for Vela have been moved to github.com/go-vela/server/constants. // -// import "github.com/go-vela/types/constants" +// This package is frozen. package constants diff --git a/database/build.go b/database/build.go index 79a856a2..7446237f 100644 --- a/database/build.go +++ b/database/build.go @@ -30,6 +30,8 @@ const ( ) // Build is the database representation of a build for a pipeline. +// +// Deprecated: use Build from github.com/go-vela/server/database/types instead. type Build struct { ID sql.NullInt64 `sql:"id"` RepoID sql.NullInt64 `sql:"repo_id"` diff --git a/database/build_executable.go b/database/build_executable.go index 615284ea..1163cf34 100644 --- a/database/build_executable.go +++ b/database/build_executable.go @@ -17,6 +17,8 @@ var ( ) // BuildExecutable is the database representation of a BuildExecutable. +// +// Deprecated: use BuildExecutable from github.com/go-vela/server/database/types instead. type BuildExecutable struct { ID sql.NullInt64 `sql:"id"` BuildID sql.NullInt64 `sql:"build_id"` diff --git a/database/build_queue.go b/database/build_queue.go index 131b184c..f4e3b6fe 100644 --- a/database/build_queue.go +++ b/database/build_queue.go @@ -9,6 +9,8 @@ import ( ) // BuildQueue is the database representation of the builds in the queue. +// +// Deprecated: use QueueBuild from github.com/go-vela/server/database/types instead. type BuildQueue struct { Status sql.NullString `sql:"status"` Number sql.NullInt32 `sql:"number"` diff --git a/database/deployment.go b/database/deployment.go index 61a56136..d165fe3f 100644 --- a/database/deployment.go +++ b/database/deployment.go @@ -25,6 +25,8 @@ var ( ) // Deployment is the database representation of a deployment for a repo. +// +// Deprecated: use Deployment from github.com/go-vela/server/database/types instead. type Deployment struct { ID sql.NullInt64 `sql:"id"` Number sql.NullInt64 `sql:"number"` diff --git a/database/doc.go b/database/doc.go index 38a39f75..633facb6 100644 --- a/database/doc.go +++ b/database/doc.go @@ -2,7 +2,7 @@ // Package database provides the defined database types for Vela. // -// Usage: +// Deprecated: all database types for Vela have been moved to github.com/go-vela/server/database/types . // -// import "github.com/go-vela/types/database" +// This package is frozen. package database diff --git a/database/hook.go b/database/hook.go index 6a10f5d1..53a0a274 100644 --- a/database/hook.go +++ b/database/hook.go @@ -28,6 +28,8 @@ var ( ) // Hook is the database representation of a webhook for a repo. +// +// Deprecated: use Hook from github.com/go-vela/server/database/types instead. type Hook struct { ID sql.NullInt64 `sql:"id"` RepoID sql.NullInt64 `sql:"repo_id"` diff --git a/database/log.go b/database/log.go index 9afa1350..b5c6e64f 100644 --- a/database/log.go +++ b/database/log.go @@ -24,6 +24,8 @@ var ( ) // Log is the database representation of a log for a step in a build. +// +// Deprecated: use Log from github.com/go-vela/server/database/types instead. type Log struct { ID sql.NullInt64 `sql:"id"` BuildID sql.NullInt64 `sql:"build_id"` diff --git a/database/pipeline.go b/database/pipeline.go index 21936294..dabd2f2b 100644 --- a/database/pipeline.go +++ b/database/pipeline.go @@ -32,6 +32,8 @@ var ( ) // Pipeline is the database representation of a pipeline. +// +// Deprecated: use Pipeline from github.com/go-vela/server/database/types instead. type Pipeline struct { ID sql.NullInt64 `sql:"id"` RepoID sql.NullInt64 `sql:"repo_id"` diff --git a/database/repo.go b/database/repo.go index 5c4f8c2c..836be93b 100644 --- a/database/repo.go +++ b/database/repo.go @@ -44,6 +44,8 @@ var ( ) // Repo is the database representation of a repo. +// +// Deprecated: use Repo from github.com/go-vela/server/database/types instead. type Repo struct { ID sql.NullInt64 `sql:"id"` UserID sql.NullInt64 `sql:"user_id"` diff --git a/database/schedule.go b/database/schedule.go index bd678b79..5c487904 100644 --- a/database/schedule.go +++ b/database/schedule.go @@ -26,6 +26,8 @@ var ( ) // Schedule is the database representation of a schedule for a repo. +// +// Deprecated: use Schedule from github.com/go-vela/server/database/types instead. type Schedule struct { ID sql.NullInt64 `sql:"id"` RepoID sql.NullInt64 `sql:"repo_id"` diff --git a/database/secret.go b/database/secret.go index 33dcd800..eb78816e 100644 --- a/database/secret.go +++ b/database/secret.go @@ -41,6 +41,8 @@ var ( ) // Secret is the database representation of a secret. +// +// Deprecated: use Secret from github.com/go-vela/server/database/types instead. type Secret struct { ID sql.NullInt64 `sql:"id"` Org sql.NullString `sql:"org"` diff --git a/database/service.go b/database/service.go index 651aef30..6764bdb5 100644 --- a/database/service.go +++ b/database/service.go @@ -32,6 +32,8 @@ var ( ) // Service is the database representation of a service in a build. +// +// Deprecated: use Service from github.com/go-vela/server/database/types instead. type Service struct { ID sql.NullInt64 `sql:"id"` BuildID sql.NullInt64 `sql:"build_id"` diff --git a/database/step.go b/database/step.go index 34304168..7b41da5b 100644 --- a/database/step.go +++ b/database/step.go @@ -32,6 +32,8 @@ var ( ) // Step is the database representation of a step in a build. +// +// Deprecated: use Step from github.com/go-vela/server/database/types instead. type Step struct { ID sql.NullInt64 `sql:"id"` BuildID sql.NullInt64 `sql:"build_id"` diff --git a/database/user.go b/database/user.go index a5030bcc..4de0edb8 100644 --- a/database/user.go +++ b/database/user.go @@ -41,6 +41,8 @@ var ( ) // User is the database representation of a user. +// +// Deprecated: use User from github.com/go-vela/server/database/types instead. type User struct { ID sql.NullInt64 `sql:"id"` Name sql.NullString `sql:"name"` diff --git a/database/worker.go b/database/worker.go index 45d76388..02c2abeb 100644 --- a/database/worker.go +++ b/database/worker.go @@ -27,6 +27,8 @@ var ( ) // Worker is the database representation of a worker. +// +// Deprecated: use Worker from github.com/go-vela/server/database/types instead. type Worker struct { ID sql.NullInt64 `sql:"id"` Hostname sql.NullString `sql:"hostname"` diff --git a/errors.go b/errors.go index a3c7b919..5b7dbbd1 100644 --- a/errors.go +++ b/errors.go @@ -6,7 +6,7 @@ import "fmt" // Error is the json error message from the server for a given http response. // -// swagger:model Error +// Deprecated: use Error from github.com/go-vela/server/api/types instead. type Error struct { Message *string `json:"error"` } diff --git a/item.go b/item.go index 55f8ad0b..bc735b04 100644 --- a/item.go +++ b/item.go @@ -13,6 +13,8 @@ import ( const ItemVersion uint64 = 2 // Item is the queue representation of an item to publish to the queue. +// +// Deprecated: use Item from github.com/go-vela/server/queue/models instead. type Item struct { Build *library.Build `json:"build"` Repo *library.Repo `json:"repo"` diff --git a/library/actions/comment.go b/library/actions/comment.go index 499cfed6..eb3eb871 100644 --- a/library/actions/comment.go +++ b/library/actions/comment.go @@ -6,6 +6,8 @@ import "github.com/go-vela/types/constants" // Comment is the library representation of the various actions associated // with the comment event webhook from the SCM. +// +// Deprecated: use Comment from github.com/go-vela/server/api/types/actions instead. type Comment struct { Created *bool `json:"created"` Edited *bool `json:"edited"` diff --git a/library/actions/deploy.go b/library/actions/deploy.go index d4970611..7620c12f 100644 --- a/library/actions/deploy.go +++ b/library/actions/deploy.go @@ -7,6 +7,8 @@ import "github.com/go-vela/types/constants" // Deploy is the library representation of the various actions associated // with the deploy event webhook from the SCM. +// +// Deprecated: use Deploy from github.com/go-vela/server/api/types/actions instead. type Deploy struct { Created *bool `json:"created"` } diff --git a/library/actions/doc.go b/library/actions/doc.go new file mode 100644 index 00000000..1211c5c9 --- /dev/null +++ b/library/actions/doc.go @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: Apache-2.0 + +// Package actions provides the defined event action types for Vela. +// +// Deprecated: all event action types for Vela have been moved to github.com/go-vela/server/api/types/actions . +// +// This package is frozen. +package actions diff --git a/library/actions/pull.go b/library/actions/pull.go index b7d8f93c..be21d565 100644 --- a/library/actions/pull.go +++ b/library/actions/pull.go @@ -6,6 +6,8 @@ import "github.com/go-vela/types/constants" // Pull is the library representation of the various actions associated // with the pull_request event webhook from the SCM. +// +// Deprecated: use Pull from github.com/go-vela/server/api/types/actions instead. type Pull struct { Opened *bool `json:"opened"` Edited *bool `json:"edited"` diff --git a/library/actions/push.go b/library/actions/push.go index 612b2cff..37405528 100644 --- a/library/actions/push.go +++ b/library/actions/push.go @@ -6,6 +6,8 @@ import "github.com/go-vela/types/constants" // Push is the library representation of the various actions associated // with the push event webhook from the SCM. +// +// Deprecated: use Push from github.com/go-vela/server/api/types/actions instead. type Push struct { Branch *bool `json:"branch"` Tag *bool `json:"tag"` diff --git a/library/actions/schedule.go b/library/actions/schedule.go index 634e638f..43679305 100644 --- a/library/actions/schedule.go +++ b/library/actions/schedule.go @@ -7,6 +7,8 @@ import "github.com/go-vela/types/constants" // Schedule is the library representation of the various actions associated // with the schedule event. +// +// Deprecated: use Schedule from github.com/go-vela/server/api/types/actions instead. type Schedule struct { Run *bool `json:"run"` } diff --git a/library/build_executable.go b/library/build_executable.go index a2e0cff4..013f9ab4 100644 --- a/library/build_executable.go +++ b/library/build_executable.go @@ -8,7 +8,7 @@ import ( // BuildExecutable is the library representation of a BuildExecutable. // -// swagger:model BuildExecutable +// Deprecated: use BuildExecutable from github.com/go-vela/server/api/types instead. type BuildExecutable struct { ID *int64 `json:"id,omitempty"` BuildID *int64 `json:"build_id,omitempty"` diff --git a/library/build_queue.go b/library/build_queue.go index 21cf3a20..2d2ac1b5 100644 --- a/library/build_queue.go +++ b/library/build_queue.go @@ -8,8 +8,6 @@ import "fmt" // BuildQueue is the library representation of the builds in the queue. // // Deprecated: use QueueBuild from github.com/go-vela/server/api/types instead. -// -// swagger:model BuildQueue type BuildQueue struct { Status *string `json:"status,omitempty"` Number *int32 `json:"number,omitempty"` diff --git a/library/deployment.go b/library/deployment.go index b37d80ff..7bee3aad 100644 --- a/library/deployment.go +++ b/library/deployment.go @@ -10,7 +10,7 @@ import ( // Deployment is the library representation of a deployment. // -// swagger:model Deployment +// Deprecated: use Deployment from github.com/go-vela/server/api/types instead. type Deployment struct { ID *int64 `json:"id,omitempty"` Number *int64 `json:"number,omitempty"` diff --git a/library/doc.go b/library/doc.go index 06cc4475..4ab1ac84 100644 --- a/library/doc.go +++ b/library/doc.go @@ -2,7 +2,7 @@ // Package library provides the defined library types for Vela. // -// Usage: +// Deprecated: all library types for Vela have been moved to github.com/go-vela/server/api/types . // -// import "github.com/go-vela/types/library" +// This package is frozen. package library diff --git a/library/events.go b/library/events.go index 48351517..c6757525 100644 --- a/library/events.go +++ b/library/events.go @@ -13,6 +13,8 @@ import ( // Events is the library representation of the various events that generate a // webhook from the SCM. +// +// Deprecated: use Events from github.com/go-vela/server/api/types instead. type Events struct { Push *actions.Push `json:"push"` PullRequest *actions.Pull `json:"pull_request"` diff --git a/library/log.go b/library/log.go index 3c41f429..a4c0c212 100644 --- a/library/log.go +++ b/library/log.go @@ -11,7 +11,7 @@ import ( // Log is the library representation of a log for a step in a build. // -// swagger:model Log +// Deprecated: use Log from github.com/go-vela/server/api/types instead. type Log struct { ID *int64 `json:"id,omitempty"` BuildID *int64 `json:"build_id,omitempty"` diff --git a/library/pipeline.go b/library/pipeline.go index 1a706604..ba10bfcb 100644 --- a/library/pipeline.go +++ b/library/pipeline.go @@ -8,7 +8,7 @@ import ( // Pipeline is the library representation of a Pipeline. // -// swagger:model Pipeline +// Deprecated: use Pipeline from github.com/go-vela/server/api/types instead. type Pipeline struct { ID *int64 `json:"id,omitempty"` RepoID *int64 `json:"repo_id,omitempty"` diff --git a/library/queue_info.go b/library/queue_info.go index 687c2c02..629c2d28 100644 --- a/library/queue_info.go +++ b/library/queue_info.go @@ -4,7 +4,7 @@ package library // QueueInfo is the library representation of a QueueInfo. // -// swagger:model QueueInfo +// Deprecated: use QueueInfo from github.com/go-vela/server/api/types instead. type QueueInfo struct { QueuePublicKey *string `json:"queue_public_key,omitempty"` QueueAddress *string `json:"queue_address,omitempty"` diff --git a/library/secret.go b/library/secret.go index 099efb55..a9d003e8 100644 --- a/library/secret.go +++ b/library/secret.go @@ -12,7 +12,7 @@ import ( // Secret is the library representation of a secret. // -// swagger:model Secret +// Deprecated: use Secret from github.com/go-vela/server/api/types instead. type Secret struct { ID *int64 `json:"id,omitempty"` Org *string `json:"org,omitempty"` diff --git a/library/service.go b/library/service.go index b5ed543b..50d557d2 100644 --- a/library/service.go +++ b/library/service.go @@ -13,7 +13,7 @@ import ( // Service is the library representation of a service in a build. // -// swagger:model Service +// Deprecated: use Service from github.com/go-vela/server/api/types instead. type Service struct { ID *int64 `json:"id,omitempty"` BuildID *int64 `json:"build_id,omitempty"` diff --git a/library/step.go b/library/step.go index bf33ae5c..d0592c5e 100644 --- a/library/step.go +++ b/library/step.go @@ -13,7 +13,7 @@ import ( // Step is the library representation of a step in a build. // -// swagger:model Step +// Deprecated: use Step from github.com/go-vela/server/api/types instead. type Step struct { ID *int64 `json:"id,omitempty"` BuildID *int64 `json:"build_id,omitempty"` diff --git a/library/template.go b/library/template.go index 6a4e58cb..a862c990 100644 --- a/library/template.go +++ b/library/template.go @@ -9,7 +9,7 @@ import ( // Template is the library representation of a template for a pipeline. // -// swagger:model Template +// Deprecated: use Template from github.com/go-vela/server/api/types instead. type Template struct { Link *string `json:"link,omitempty"` Name *string `json:"name,omitempty"` diff --git a/library/token.go b/library/token.go index 06f626b2..4d177134 100644 --- a/library/token.go +++ b/library/token.go @@ -6,7 +6,7 @@ import "fmt" // Token is the library representation of a token response from server. // -// swagger:model Token +// Deprecated: use Token from github.com/go-vela/server/api/types instead. type Token struct { Token *string `json:"token,omitempty"` } diff --git a/metadata.go b/metadata.go index 1c9acf2f..673884d0 100644 --- a/metadata.go +++ b/metadata.go @@ -6,12 +6,16 @@ import "time" type ( // Database is the extra set of database data passed to the compiler. + // + // Deprecated: use Database from github.com/go-vela/server/internal instead. Database struct { Driver string `json:"driver"` Host string `json:"host"` } // Queue is the extra set of queue data passed to the compiler. + // + // Deprecated: use Queue from github.com/go-vela/server/internal instead. Queue struct { Channel string `json:"channel"` Driver string `json:"driver"` @@ -19,12 +23,16 @@ type ( } // Source is the extra set of source data passed to the compiler. + // + // Deprecated: use Source from github.com/go-vela/server/internal instead. Source struct { Driver string `json:"driver"` Host string `json:"host"` } // Vela is the extra set of Vela data passed to the compiler. + // + // Deprecated: use Vela from github.com/go-vela/server/internal instead. Vela struct { Address string `json:"address"` WebAddress string `json:"web_address"` @@ -35,6 +43,8 @@ type ( // Metadata is the extra set of data passed to the compiler for // converting a yaml configuration to an executable pipeline. + // + // Deprecated: use Metadata from github.com/go-vela/server/internal instead. Metadata struct { Database *Database `json:"database"` Queue *Queue `json:"queue"` diff --git a/pipeline/build.go b/pipeline/build.go index 55864b80..360105dc 100644 --- a/pipeline/build.go +++ b/pipeline/build.go @@ -13,7 +13,7 @@ import ( // Build is the pipeline representation of a build for a pipeline. // -// swagger:model PipelineBuild +// Deprecated: use Build from github.com/go-vela/server/compiler/types/pipeline instead. type Build struct { ID string `json:"id,omitempty" yaml:"id,omitempty"` Version string `json:"version,omitempty" yaml:"version,omitempty"` diff --git a/pipeline/container.go b/pipeline/container.go index 85a96d8b..cd28206b 100644 --- a/pipeline/container.go +++ b/pipeline/container.go @@ -21,15 +21,13 @@ type ( // ContainerSlice is the pipeline representation // of the Containers block for a pipeline. // - // swagger:model PipelineContainerSlice - // - // swagger:model PipelineContainerSlice + // Deprecated: use ContainerSlice from github.com/go-vela/server/compiler/types/pipeline instead. ContainerSlice []*Container // Container is the pipeline representation // of a Container in a pipeline. // - // swagger:model PipelineContainer + // Deprecated: use Container from github.com/go-vela/server/compiler/types/pipeline instead. Container struct { ID string `json:"id,omitempty" yaml:"id,omitempty"` Commands []string `json:"commands,omitempty" yaml:"commands,omitempty"` diff --git a/pipeline/doc.go b/pipeline/doc.go index ccce0822..3addadd4 100644 --- a/pipeline/doc.go +++ b/pipeline/doc.go @@ -2,7 +2,7 @@ // Package pipeline provides the defined pipeline types for Vela. // -// Usage: +// Deprecated: all pipeline types for Vela have been moved to github.com/go-vela/server/compiler/types/pipeline . // -// import "github.com/go-vela/types/pipeline" +// This package is frozen. package pipeline diff --git a/pipeline/metadata.go b/pipeline/metadata.go index c4f5fdf8..4b5ec53b 100644 --- a/pipeline/metadata.go +++ b/pipeline/metadata.go @@ -4,7 +4,7 @@ package pipeline // Metadata is the pipeline representation of the metadata block for a pipeline. // -// swagger:model PipelineMetadata +// Deprecated: use Metadata from github.com/go-vela/server/compiler/types/pipeline instead. type Metadata struct { Template bool `json:"template,omitempty" yaml:"template,omitempty"` Clone bool `json:"clone,omitempty" yaml:"clone,omitempty"` @@ -13,6 +13,8 @@ type Metadata struct { } // CancelOptions is the pipeline representation of the auto_cancel block for a pipeline. +// +// Deprecated: use CancelOptions from github.com/go-vela/server/compiler/types/pipeline instead. type CancelOptions struct { Running bool `yaml:"running,omitempty" json:"running,omitempty"` Pending bool `yaml:"pending,omitempty" json:"pending,omitempty"` diff --git a/pipeline/port.go b/pipeline/port.go index 6ce572b5..e2b198d5 100644 --- a/pipeline/port.go +++ b/pipeline/port.go @@ -5,12 +5,14 @@ package pipeline type ( // PortSlice is the pipeline representation // of the ports for a step in a pipeline. + // + // Deprecated: use PortSlice from github.com/go-vela/server/compiler/types/pipeline instead. PortSlice []*Port // Port is the pipeline representation // of a port for a step in a pipeline. // - // swagger:model PipelinePort + // Deprecated: use Port from github.com/go-vela/server/compiler/types/pipeline instead. Port struct { Port int `json:"port,omitempty" yaml:"port,omitempty"` Host int `json:"host,omitempty" yaml:"host,omitempty"` diff --git a/pipeline/ruleset.go b/pipeline/ruleset.go index 53126e6c..d9f27698 100644 --- a/pipeline/ruleset.go +++ b/pipeline/ruleset.go @@ -15,7 +15,7 @@ type ( // Ruleset is the pipeline representation of // a ruleset block for a step in a pipeline. // - // swagger:model PipelineRuleset + // Deprecated: use Ruleset from github.com/go-vela/server/compiler/types/pipeline instead. Ruleset struct { If Rules `json:"if,omitempty" yaml:"if,omitempty"` Unless Rules `json:"unless,omitempty" yaml:"unless,omitempty"` @@ -27,7 +27,7 @@ type ( // Rules is the pipeline representation of the ruletypes // from a ruleset block for a step in a pipeline. // - // swagger:model PipelineRules + // Deprecated: use Rules from github.com/go-vela/server/compiler/types/pipeline instead. Rules struct { Branch Ruletype `json:"branch,omitempty" yaml:"branch,omitempty"` Comment Ruletype `json:"comment,omitempty" yaml:"comment,omitempty"` @@ -45,11 +45,13 @@ type ( // Ruletype is the pipeline representation of an element // for a ruleset block for a step in a pipeline. // - // swagger:model PipelineRuletype + // Deprecated: use Ruletype from github.com/go-vela/server/compiler/types/pipeline instead. Ruletype []string // RuleData is the data to check our ruleset // against for a step in a pipeline. + // + // Deprecated: use RuleData from github.com/go-vela/server/compiler/types/pipeline instead. RuleData struct { Branch string `json:"branch,omitempty" yaml:"branch,omitempty"` Comment string `json:"comment,omitempty" yaml:"comment,omitempty"` diff --git a/pipeline/secret.go b/pipeline/secret.go index bbc5e260..c7bfd031 100644 --- a/pipeline/secret.go +++ b/pipeline/secret.go @@ -14,13 +14,13 @@ type ( // SecretSlice is the pipeline representation // of the secrets block for a pipeline. // - // swagger:model PipelineSecretSlice + // Deprecated: use SecretSlice from github.com/go-vela/server/compiler/types/pipeline instead. SecretSlice []*Secret // Secret is the pipeline representation of a // secret from the secrets block for a pipeline. // - // swagger:model PipelineSecret + // Deprecated: use Secret from github.com/go-vela/server/compiler/types/pipeline instead. Secret struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Value string `json:"value,omitempty" yaml:"value,omitempty"` @@ -34,13 +34,13 @@ type ( // StepSecretSlice is the pipeline representation // of the secrets block for a step in a pipeline. // - // swagger:model PipelineStepSecretSlice + // Deprecated: use StepSecretSlice from github.com/go-vela/server/compiler/types/pipeline instead. StepSecretSlice []*StepSecret // StepSecret is the pipeline representation of a secret // from a secrets block for a step in a pipeline. // - // swagger:model PipelineStepSecret + // Deprecated: use StepSecret from github.com/go-vela/server/compiler/types/pipeline instead. StepSecret struct { Source string `json:"source,omitempty" yaml:"source,omitempty"` Target string `json:"target,omitempty" yaml:"target,omitempty"` diff --git a/pipeline/stage.go b/pipeline/stage.go index 2325f340..529692c8 100644 --- a/pipeline/stage.go +++ b/pipeline/stage.go @@ -12,13 +12,13 @@ type ( // StageSlice is the pipeline representation // of the stages block for a pipeline. // - // swagger:model PipelineStageSlice + // Deprecated: use StageSlice from github.com/go-vela/server/compiler/types/pipeline instead. StageSlice []*Stage // Stage is the pipeline representation // of a stage in a pipeline. // - // swagger:model PipelineStage + // Deprecated: use Stage from github.com/go-vela/server/compiler/types/pipeline instead. Stage struct { Done chan error `json:"-" yaml:"-"` Environment map[string]string `json:"environment,omitempty" yaml:"environment,omitempty"` diff --git a/pipeline/ulimit.go b/pipeline/ulimit.go index a32b6c90..847f275f 100644 --- a/pipeline/ulimit.go +++ b/pipeline/ulimit.go @@ -6,13 +6,13 @@ type ( // UlimitSlice is the pipeline representation of // the ulimits block for a step in a pipeline. // - // swagger:model PipelineUlimitSlice + // Deprecated: use UlimitSlice from github.com/go-vela/server/compiler/types/pipeline instead. UlimitSlice []*Ulimit // Ulimit is the pipeline representation of a ulimit // from the ulimits block for a step in a pipeline. // - // swagger:model PipelineUlimit + // Deprecated: use Ulimit from github.com/go-vela/server/compiler/types/pipeline instead. Ulimit struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` Soft int64 `json:"soft,omitempty" yaml:"soft,omitempty"` diff --git a/pipeline/volume.go b/pipeline/volume.go index c99342f5..5916b18d 100644 --- a/pipeline/volume.go +++ b/pipeline/volume.go @@ -6,13 +6,13 @@ type ( // VolumeSlice is the pipeline representation of // the volumes block for a step in a pipeline. // - // swagger:model PipelineVolumeSlice + // Deprecated: use VolumeSlice from github.com/go-vela/server/compiler/types/pipeline instead. VolumeSlice []*Volume // Volume is the pipeline representation of a volume // from a volumes block for a step in a pipeline. // - // swagger:model PipelineVolume + // Deprecated: use Volume from github.com/go-vela/server/compiler/types/pipeline instead. Volume struct { Source string `json:"source,omitempty" yaml:"source,omitempty"` Destination string `json:"destination,omitempty" yaml:"destination,omitempty"` diff --git a/pipeline/worker.go b/pipeline/worker.go index 1c667bfc..d18045db 100644 --- a/pipeline/worker.go +++ b/pipeline/worker.go @@ -4,7 +4,7 @@ package pipeline // Worker is the yaml representation of the worker block for a pipeline. // -// swagger:model PipelineWorker +// Deprecated: use Worker from github.com/go-vela/server/compiler/types/pipeline instead. type Worker struct { Flavor string `json:"flavor,omitempty" yaml:"flavor,omitempty"` Platform string `json:"platform,omitempty" yaml:"platform,omitempty"` diff --git a/raw/doc.go b/raw/doc.go index 7321b7f3..cbe49581 100644 --- a/raw/doc.go +++ b/raw/doc.go @@ -2,7 +2,7 @@ // Package raw provides the defined raw types for Vela. // -// Usage: +// Deprecated: all raw types for Vela have been moved to github.com/go-vela/server/compiler/types/raw . // -// import "github.com/go-vela/types/raw" +// This package is frozen. package raw diff --git a/raw/map.go b/raw/map.go index ed8fff42..33e4fb2b 100644 --- a/raw/map.go +++ b/raw/map.go @@ -10,6 +10,8 @@ import ( ) // StringSliceMap represents an array of strings or a map of strings. +// +// Deprecated: use StringSliceMap from github.com/go-vela/server/compiler/types/raw instead. type StringSliceMap map[string]string // Value returns the map in JSON format. diff --git a/raw/slice.go b/raw/slice.go index 11746363..e1a747a6 100644 --- a/raw/slice.go +++ b/raw/slice.go @@ -8,6 +8,8 @@ import ( ) // StringSlice represents a string or an array of strings. +// +// Deprecated: use StringSlice from github.com/go-vela/server/compiler/types/raw instead. type StringSlice []string // UnmarshalJSON implements the Unmarshaler interface for the StringSlice type. diff --git a/version/doc.go b/version/doc.go index 603a2379..67622f5a 100644 --- a/version/doc.go +++ b/version/doc.go @@ -2,7 +2,7 @@ // Package version provides the defined version types for Vela. // -// Usage: +// Deprecated: all version types for Vela have been moved to github.com/go-vela/server/version . // -// import "github.com/go-vela/types/version" +// This package is frozen. package version diff --git a/version/metadata.go b/version/metadata.go index 3cb7fcfb..cc8011e3 100644 --- a/version/metadata.go +++ b/version/metadata.go @@ -14,6 +14,8 @@ const metaFormat = `{ }` // Metadata represents extra information surrounding the application version. +// +// Deprecated: use Metadata from github.com/go-vela/server/version instead. type Metadata struct { // Architecture represents the architecture information for the application. Architecture string `json:"architecture,omitempty"` diff --git a/version/version.go b/version/version.go index 148f9499..4af55101 100644 --- a/version/version.go +++ b/version/version.go @@ -26,7 +26,7 @@ const versionFormat = `{ // follows semantic version guidelines from // https://semver.org/. // -// swagger:model Version +// Deprecated: use Version from github.com/go-vela/server/compiler/types/version instead. type Version struct { // Canonical represents a canonical semantic version for the application. Canonical string `json:"canonical"` diff --git a/webhook.go b/webhook.go index 579e8230..60094055 100644 --- a/webhook.go +++ b/webhook.go @@ -15,6 +15,8 @@ var ( // PullRequest defines the data pulled from PRs while // processing a webhook. +// +// Deprecated: use PullRequest from github.com/go-vela/server/internal instead. type PullRequest struct { Comment string Number int @@ -25,6 +27,8 @@ type PullRequest struct { // Webhook defines a struct that is used to return // the required data when processing webhook event // a for a source provider event. +// +// Deprecated: use Webhook from github.com/go-vela/server/internal instead. type Webhook struct { Hook *library.Hook Repo *library.Repo diff --git a/yaml/build.go b/yaml/build.go index c8ed9dbb..d71da82a 100644 --- a/yaml/build.go +++ b/yaml/build.go @@ -8,6 +8,8 @@ import ( ) // Build is the yaml representation of a build for a pipeline. +// +// Deprecated: use Build from github.com/go-vela/server/compiler/types/yaml instead. type Build struct { Version string `yaml:"version,omitempty" json:"version,omitempty" jsonschema:"required,minLength=1,description=Provide syntax version used to evaluate the pipeline.\nReference: https://go-vela.github.io/docs/reference/yaml/version/"` Metadata Metadata `yaml:"metadata,omitempty" json:"metadata,omitempty" jsonschema:"description=Pass extra information.\nReference: https://go-vela.github.io/docs/reference/yaml/metadata/"` diff --git a/yaml/doc.go b/yaml/doc.go index 88753d51..06b12839 100644 --- a/yaml/doc.go +++ b/yaml/doc.go @@ -2,7 +2,7 @@ // Package yaml provides the defined yaml types for Vela. // -// Usage: +// Deprecated: all yaml types for Vela have been moved to github.com/go-vela/server/compiler/types/yaml . // -// import "github.com/go-vela/types/yaml" +// This package is frozen. package yaml diff --git a/yaml/metadata.go b/yaml/metadata.go index a9a5f5e7..d6061e7f 100644 --- a/yaml/metadata.go +++ b/yaml/metadata.go @@ -9,6 +9,8 @@ import ( type ( // Metadata is the yaml representation of // the metadata block for a pipeline. + // + // Deprecated: use Metadata from github.com/go-vela/server/compiler/types/yaml instead. Metadata struct { Template bool `yaml:"template,omitempty" json:"template,omitempty" jsonschema:"description=Enables compiling the pipeline as a template.\nReference: https://go-vela.github.io/docs/reference/yaml/metadata/#the-template-key"` RenderInline bool `yaml:"render_inline,omitempty" json:"render_inline,omitempty" jsonschema:"description=Enables inline compiling for the pipeline templates.\nReference: https://go-vela.github.io/docs/reference/yaml/metadata/#the-render-inline-key"` @@ -19,6 +21,8 @@ type ( // CancelOptions is the yaml representation of // the auto_cancel block for a pipeline. + // + // Deprecated: use CancelOptions from github.com/go-vela/server/compiler/types/yaml instead. CancelOptions struct { Running *bool `yaml:"running,omitempty" json:"running,omitempty" jsonschema:"description=Enables auto canceling of running pipelines that become stale due to new push.\nReference: https://go-vela.github.io/docs/reference/yaml/metadata/#the-auto-cancel-key"` Pending *bool `yaml:"pending,omitempty" json:"pending,omitempty" jsonschema:"description=Enables auto canceling of queued pipelines that become stale due to new push.\nReference: https://go-vela.github.io/docs/reference/yaml/metadata/#the-auto-cancel-key"` diff --git a/yaml/ruleset.go b/yaml/ruleset.go index 65740037..546114cb 100644 --- a/yaml/ruleset.go +++ b/yaml/ruleset.go @@ -11,6 +11,8 @@ import ( type ( // Ruleset is the yaml representation of a // ruleset block for a step in a pipeline. + // + // Deprecated: use Ruleset from github.com/go-vela/server/compiler/types/yaml instead. Ruleset struct { If Rules `yaml:"if,omitempty" json:"if,omitempty" jsonschema:"description=Limit execution to when all rules match.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-ruleset-key"` Unless Rules `yaml:"unless,omitempty" json:"unless,omitempty" jsonschema:"description=Limit execution to when all rules do not match.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-ruleset-key"` @@ -21,6 +23,8 @@ type ( // Rules is the yaml representation of the ruletypes // from a ruleset block for a step in a pipeline. + // + // Deprecated: use Rules from github.com/go-vela/server/compiler/types/yaml instead. Rules struct { Branch []string `yaml:"branch,omitempty,flow" json:"branch,omitempty" jsonschema:"description=Limits the execution of a step to matching build branches.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-ruleset-key"` Comment []string `yaml:"comment,omitempty,flow" json:"comment,omitempty" jsonschema:"description=Limits the execution of a step to matching a pull request comment.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-ruleset-key"` diff --git a/yaml/secret.go b/yaml/secret.go index cc28b988..a6d4b097 100644 --- a/yaml/secret.go +++ b/yaml/secret.go @@ -15,10 +15,14 @@ import ( type ( // SecretSlice is the yaml representation // of the secrets block for a pipeline. + // + // Deprecated: use SecretSlice from github.com/go-vela/server/compiler/types/yaml instead. SecretSlice []*Secret // Secret is the yaml representation of a secret // from the secrets block for a pipeline. + // + // Deprecated: use Secret from github.com/go-vela/server/compiler/types/yaml instead. Secret struct { Name string `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"required,minLength=1,description=Name of secret to reference in the pipeline.\nReference: https://go-vela.github.io/docs/reference/yaml/secrets/#the-name-key"` Key string `yaml:"key,omitempty" json:"key,omitempty" jsonschema:"minLength=1,description=Path to secret to fetch from storage backend.\nReference: https://go-vela.github.io/docs/reference/yaml/secrets/#the-key-key"` @@ -30,6 +34,8 @@ type ( // Origin is the yaml representation of a method // for looking up secrets with a secret plugin. + // + // Deprecated: use Origin from github.com/go-vela/server/compiler/types/yaml instead. Origin struct { Environment raw.StringSliceMap `yaml:"environment,omitempty" json:"environment,omitempty" jsonschema:"description=Variables to inject into the container environment.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-environment-key"` Image string `yaml:"image,omitempty" json:"image,omitempty" jsonschema:"required,minLength=1,description=Docker image to use to create the ephemeral container.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-image-key"` @@ -198,10 +204,14 @@ func (o *Origin) ToPipeline() *pipeline.Container { type ( // StepSecretSlice is the yaml representation of // the secrets block for a step in a pipeline. + // + // Deprecated: use StepSecretSlice from github.com/go-vela/server/compiler/types/yaml instead. StepSecretSlice []*StepSecret // StepSecret is the yaml representation of a secret // from a secrets block for a step in a pipeline. + // + // Deprecated: use StepSecret from github.com/go-vela/server/compiler/types/yaml instead. StepSecret struct { Source string `yaml:"source,omitempty"` Target string `yaml:"target,omitempty"` diff --git a/yaml/service.go b/yaml/service.go index b6807a21..230b074b 100644 --- a/yaml/service.go +++ b/yaml/service.go @@ -14,10 +14,14 @@ import ( type ( // ServiceSlice is the yaml representation // of the Services block for a pipeline. + // + // Deprecated: use ServiceSlice from github.com/go-vela/server/compiler/types/yaml instead. ServiceSlice []*Service // Service is the yaml representation // of a Service in a pipeline. + // + // Deprecated: use Service from github.com/go-vela/server/compiler/types/yaml instead. Service struct { Image string `yaml:"image,omitempty" json:"image,omitempty" jsonschema:"required,minLength=1,description=Docker image used to create ephemeral container.\nReference: https://go-vela.github.io/docs/reference/yaml/services/#the-image-key"` Name string `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"required,minLength=1,description=Unique identifier for the container in the pipeline.\nReference: https://go-vela.github.io/docs/reference/yaml/services/#the-name-key"` diff --git a/yaml/stage.go b/yaml/stage.go index 5e166444..92451ac1 100644 --- a/yaml/stage.go +++ b/yaml/stage.go @@ -14,10 +14,14 @@ import ( type ( // StageSlice is the yaml representation // of the stages block for a pipeline. + // + // Deprecated: use StageSlice from github.com/go-vela/server/compiler/types/yaml instead. StageSlice []*Stage // Stage is the yaml representation // of a stage in a pipeline. + // + // Deprecated: use Stage from github.com/go-vela/server/compiler/types/yaml instead. Stage struct { Environment raw.StringSliceMap `yaml:"environment,omitempty" json:"environment,omitempty" jsonschema:"description=Provide environment variables injected into the container environment.\nReference: https://go-vela.github.io/docs/reference/yaml/stages/#the-environment-key"` Name string `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"minLength=1,description=Unique identifier for the stage in the pipeline.\nReference: https://go-vela.github.io/docs/reference/yaml/stages/#the-name-key"` diff --git a/yaml/step.go b/yaml/step.go index e9da9f4f..87c0930b 100644 --- a/yaml/step.go +++ b/yaml/step.go @@ -14,10 +14,14 @@ import ( type ( // StepSlice is the yaml representation // of the steps block for a pipeline. + // + // Deprecated: use StepSlice from github.com/go-vela/server/compiler/types/yaml instead. StepSlice []*Step // Step is the yaml representation of a step // from the steps block for a pipeline. + // + // Deprecated: use Step from github.com/go-vela/server/compiler/types/yaml instead. Step struct { Ruleset Ruleset `yaml:"ruleset,omitempty" json:"ruleset,omitempty" jsonschema:"description=Conditions to limit the execution of the container.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-ruleset-key"` Commands raw.StringSlice `yaml:"commands,omitempty" json:"commands,omitempty" jsonschema:"description=Execution instructions to run inside the container.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-commands-key"` diff --git a/yaml/template.go b/yaml/template.go index 22dbf275..ae42277c 100644 --- a/yaml/template.go +++ b/yaml/template.go @@ -9,10 +9,14 @@ import ( type ( // TemplateSlice is the yaml representation // of the templates block for a pipeline. + // + // Deprecated: use TemplateSlice from github.com/go-vela/server/compiler/types/yaml instead. TemplateSlice []*Template // Template is the yaml representation of a template // from the templates block for a pipeline. + // + // Deprecated: use Template from github.com/go-vela/server/compiler/types/yaml instead. Template struct { Name string `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"required,minLength=1,description=Unique identifier for the template.\nReference: https://go-vela.github.io/docs/reference/yaml/templates/#the-name-key"` Source string `yaml:"source,omitempty" json:"source,omitempty" jsonschema:"required,minLength=1,description=Path to template in remote system.\nReference: https://go-vela.github.io/docs/reference/yaml/templates/#the-source-key"` @@ -23,6 +27,8 @@ type ( // StepTemplate is the yaml representation of the // template block for a step in a pipeline. + // + // Deprecated: use StepTemplate from github.com/go-vela/server/compiler/types/yaml instead. StepTemplate struct { Name string `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"required,minLength=1,description=Unique identifier for the template.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-template-key"` Variables map[string]interface{} `yaml:"vars,omitempty" json:"vars,omitempty" jsonschema:"description=Variables injected into the template.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-template-key"` diff --git a/yaml/ulimit.go b/yaml/ulimit.go index 8d1533a9..62f3c65e 100644 --- a/yaml/ulimit.go +++ b/yaml/ulimit.go @@ -14,10 +14,14 @@ import ( type ( // UlimitSlice is the yaml representation of // the ulimits block for a step in a pipeline. + // + // Deprecated: use UlimitSlice from github.com/go-vela/server/compiler/types/yaml instead. UlimitSlice []*Ulimit // Ulimit is the yaml representation of a ulimit // from the ulimits block for a step in a pipeline. + // + // Deprecated: use Ulimit from github.com/go-vela/server/compiler/types/yaml instead. Ulimit struct { Name string `yaml:"name,omitempty" json:"name,omitempty" jsonschema:"required,minLength=1,description=Unique name of the user limit.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-ulimits-key"` Soft int64 `yaml:"soft,omitempty" json:"soft,omitempty" jsonschema:"description=Set the soft limit.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-ulimits-key"` diff --git a/yaml/volume.go b/yaml/volume.go index dae67a84..ea52eced 100644 --- a/yaml/volume.go +++ b/yaml/volume.go @@ -13,10 +13,14 @@ import ( type ( // VolumeSlice is the yaml representation of // the volumes block for a step in a pipeline. + // + // Deprecated: use VolumeSlice from github.com/go-vela/server/compiler/types/yaml instead. VolumeSlice []*Volume // Volume is the yaml representation of a volume // from a volumes block for a step in a pipeline. + // + // Deprecated: use Volume from github.com/go-vela/server/compiler/types/yaml instead. Volume struct { Source string `yaml:"source,omitempty" json:"source,omitempty" jsonschema:"required,minLength=1,description=Set the source directory to be mounted.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-volume-key"` Destination string `yaml:"destination,omitempty" json:"destination,omitempty" jsonschema:"required,minLength=1,description=Set the destination directory for the mount in the container.\nReference: https://go-vela.github.io/docs/reference/yaml/steps/#the-volume-key"` diff --git a/yaml/worker.go b/yaml/worker.go index 98cc406a..3d829ddb 100644 --- a/yaml/worker.go +++ b/yaml/worker.go @@ -6,6 +6,8 @@ import "github.com/go-vela/types/pipeline" // Worker is the yaml representation of a worker // from a worker block in a pipeline. +// +// Deprecated: use Worker from github.com/go-vela/server/compiler/types/yaml instead. type Worker struct { Flavor string `yaml:"flavor,omitempty" json:"flavor,omitempty" jsonschema:"minLength=1,description=Flavor identifier for worker.\nReference: https://go-vela.github.io/docs/reference/yaml/worker/#the-flavor-key,example=large"` Platform string `yaml:"platform,omitempty" json:"platform,omitempty" jsonschema:"minLength=1,description=Platform identifier for the worker.\nReference: https://go-vela.github.io/docs/reference/yaml/worker/#the-platform-key,example=kubernetes"`