config

package
v0.42.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProjectConfigNotFound = errors.New("project config not found")
	ErrPrebuildNotFound      = errors.New("prebuild not found")
)

Functions

func IsPrebuildNotFound added in v0.26.0

func IsPrebuildNotFound(err error) bool

func IsProjectConfigNotFound

func IsProjectConfigNotFound(err error) bool

Types

type PrebuildConfig added in v0.26.0

type PrebuildConfig struct {
	Id             string   `json:"id" validate:"required"`
	Branch         string   `json:"branch" validate:"required"`
	CommitInterval *int     `json:"commitInterval" validate:"required"`
	TriggerFiles   []string `json:"triggerFiles" validate:"required"`
	Retention      int      `json:"retention" validate:"required"`

} // @name PrebuildConfig

PrebuildConfig holds configuration for the prebuild process

func (*PrebuildConfig) GenerateId added in v0.26.0

func (p *PrebuildConfig) GenerateId() error

func (*PrebuildConfig) Match added in v0.26.0

func (p *PrebuildConfig) Match(filter *PrebuildFilter) bool

type PrebuildFilter added in v0.26.0

type PrebuildFilter struct {
	ProjectConfigName *string
	Id                *string
	Branch            *string
	CommitInterval    *int
	TriggerFiles      *[]string
}

type ProjectConfig

type ProjectConfig struct {
	Name                string                   `json:"name" validate:"required"`
	Image               string                   `json:"image" validate:"required"`
	User                string                   `json:"user" validate:"required"`
	BuildConfig         *buildconfig.BuildConfig `json:"buildConfig,omitempty" validate:"optional"`
	RepositoryUrl       string                   `json:"repositoryUrl" validate:"required"`
	EnvVars             map[string]string        `json:"envVars" validate:"required"`
	IsDefault           bool                     `json:"default" validate:"required"`
	Prebuilds           []*PrebuildConfig        `json:"prebuilds" validate:"optional"`
	GitProviderConfigId *string                  `json:"gitProviderConfigId" validate:"optional"`

} // @name ProjectConfig

func (*ProjectConfig) FindPrebuild added in v0.26.0

func (pc *ProjectConfig) FindPrebuild(filter *PrebuildFilter) (*PrebuildConfig, error)

func (*ProjectConfig) ListPrebuilds added in v0.26.0

func (pc *ProjectConfig) ListPrebuilds(filter *PrebuildFilter) ([]*PrebuildConfig, error)

func (*ProjectConfig) RemovePrebuild added in v0.26.0

func (pc *ProjectConfig) RemovePrebuild(id string) error

func (*ProjectConfig) SetPrebuild added in v0.26.0

func (pc *ProjectConfig) SetPrebuild(p *PrebuildConfig) error

type ProjectConfigFilter added in v0.26.0

type ProjectConfigFilter struct {
	Name                *string
	Url                 *string
	Default             *bool
	PrebuildId          *string
	GitProviderConfigId *string
}

type Store

type Store interface {
	List(filter *ProjectConfigFilter) ([]*ProjectConfig, error)
	Find(filter *ProjectConfigFilter) (*ProjectConfig, error)
	Save(projectConfig *ProjectConfig) error
	Delete(projectConfig *ProjectConfig) error
}

Jump to

Keyboard shortcuts

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