types

package module
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

View Source
const ItemVersion uint64 = 2

ItemVersion allows the worker to detect items that were queued before an Vela server upgrade or downgrade, so it can handle such stale data gracefully. For example, the worker could fail a stale build or ask the server to recompile it. This is not a public API and is unrelated to the version key in pipeline yaml.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database deprecated added in v0.2.0

type Database struct {
	Driver string `json:"driver"`
	Host   string `json:"host"`
}

Database is the extra set of database data passed to the compiler.

Deprecated: use Database from github.com/go-vela/server/internal instead.

type Error deprecated

type Error struct {
	Message *string `json:"error"`
}

Error is the json error message from the server for a given http response.

Deprecated: use Error from github.com/go-vela/server/api/types instead.

func (*Error) String

func (e *Error) String() string

type Item deprecated

type Item struct {
	Build *library.Build `json:"build"`
	Repo  *library.Repo  `json:"repo"`
	User  *library.User  `json:"user"`
	// The 0-value is the implicit ItemVersion for queued Items that pre-date adding the field.
	ItemVersion uint64 `json:"item_version"`
}

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.

func ToItem

func ToItem(b *library.Build, r *library.Repo, u *library.User) *Item

ToItem creates a queue item from a build, repo and user.

type Metadata deprecated added in v0.2.0

type Metadata struct {
	Database *Database `json:"database"`
	Queue    *Queue    `json:"queue"`
	Source   *Source   `json:"source"`
	Vela     *Vela     `json:"vela"`
}

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.

type PullRequest deprecated added in v0.23.0

type PullRequest struct {
	Comment    string
	Number     int
	IsFromFork bool
	Labels     []string
}

PullRequest defines the data pulled from PRs while processing a webhook.

Deprecated: use PullRequest from github.com/go-vela/server/internal instead.

type Queue deprecated added in v0.2.0

type Queue struct {
	Channel string `json:"channel"`
	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.

type Source deprecated added in v0.2.0

type Source struct {
	Driver string `json:"driver"`
	Host   string `json:"host"`
}

Source is the extra set of source data passed to the compiler.

Deprecated: use Source from github.com/go-vela/server/internal instead.

type Vela deprecated added in v0.2.0

type Vela struct {
	Address              string        `json:"address"`
	WebAddress           string        `json:"web_address"`
	WebOauthCallbackPath string        `json:"web_oauth_callback_path"`
	AccessTokenDuration  time.Duration `json:"access_token_duration"`
	RefreshTokenDuration time.Duration `json:"refresh_token_duration"`
}

Vela is the extra set of Vela data passed to the compiler.

Deprecated: use Vela from github.com/go-vela/server/internal instead.

type Webhook deprecated added in v0.4.0

type Webhook struct {
	Hook        *library.Hook
	Repo        *library.Repo
	Build       *library.Build
	PullRequest PullRequest
	Deployment  *library.Deployment
}

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.

func (*Webhook) ShouldSkip added in v0.5.0

func (w *Webhook) ShouldSkip() (bool, string)

ShouldSkip uses the build information associated with the given hook to determine whether the hook should be skipped.

Directories

Path Synopsis
Package constants provides the defined constant types for Vela.
Package constants provides the defined constant types for Vela.
Package database provides the defined database types for Vela.
Package database provides the defined database types for Vela.
Package library provides the defined library types for Vela.
Package library provides the defined library types for Vela.
actions
SPDX-License-Identifier: Apache-2.0
SPDX-License-Identifier: Apache-2.0
Package pipeline provides the defined pipeline types for Vela.
Package pipeline provides the defined pipeline types for Vela.
Package raw provides the defined raw types for Vela.
Package raw provides the defined raw types for Vela.
Package version provides the defined version types for Vela.
Package version provides the defined version types for Vela.
Package yaml provides the defined yaml types for Vela.
Package yaml provides the defined yaml types for Vela.

Jump to

Keyboard shortcuts

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