integrations

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = fmt.Errorf("provider not found")
)

Known errors.

Functions

func Register

func Register(name ProviderType, p Provider)

Types

type Build

type Build struct {
	Name        string
	Description string
	URL         string
}

type Integration

type Integration struct {
	ID         string       `db:"id"`
	CodebaseID string       `db:"codebase_id"`
	Provider   ProviderType `db:"provider"`
	SeedFiles  []string     `db:"seed_files"`
	CreatedAt  time.Time    `db:"created_at"`
	UpdatedAt  time.Time    `db:"updated_at"`
	DeletedAt  *time.Time   `db:"deleted_at"`
}

type Provider

type Provider interface {
	CreateBuild(ctx context.Context, codebaseID, ciCommitId, title string) (*Build, error)
}

func Get

func Get(name ProviderType) (Provider, error)

type ProviderType

type ProviderType string
const (
	ProviderTypeUndefined ProviderType = ""
	ProviderTypeBuildkite ProviderType = "buildkite"
)

Jump to

Keyboard shortcuts

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