pipelinevalidations

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrResultNotFound  = xerror.NotFound(xerror.PipelineValidationResult)
	ErrPipelineMissing = xerror.NotFound(xerror.Pipeline)
)

Functions

This section is empty.

Types

type CreateParams

type CreateParams struct {
	Slug             slug.Slug
	PipelineSlug     slug.Slug
	Source           string
	Valid            bool
	SpecHash         *string
	DiagnosticsJSONB []byte
	ImpactReportSlug *slug.Slug
}

type ListFilters

type ListFilters struct {
	PipelineSlug *slug.Slug
	Limit        int32
}

type Repository

type Repository interface {
	Create(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, environmentSlug slug.Slug,
		params CreateParams,
	) (*Result, error)
	FindBySlug(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, environmentSlug, resultSlug slug.Slug,
	) (*Result, error)
	List(
		ctx context.Context,
		tx postgres.DBTX,
		orgSlug, projectSlug, environmentSlug slug.Slug,
		filters ListFilters,
	) ([]*Result, error)
}

func New

func New() Repository

func NewRepositoryWithLogging

func NewRepositoryWithLogging(base Repository, logger *slog.Logger) Repository

NewRepositoryWithLogging wraps base with method completion logging.

type RepositoryWithLogging

type RepositoryWithLogging struct {
	// contains filtered or unexported fields
}

RepositoryWithLogging implements Repository with method completion logging.

func (RepositoryWithLogging) Create

func (_d RepositoryWithLogging) Create(ctx context.Context, tx postgres.DBTX, orgSlug slug.Slug, projectSlug slug.Slug, environmentSlug slug.Slug, params CreateParams) (rp1 *Result, err error)

Create implements Repository.

func (RepositoryWithLogging) FindBySlug

func (_d RepositoryWithLogging) FindBySlug(ctx context.Context, tx postgres.DBTX, orgSlug slug.Slug, projectSlug slug.Slug, environmentSlug slug.Slug, resultSlug slug.Slug) (rp1 *Result, err error)

FindBySlug implements Repository.

func (RepositoryWithLogging) List

func (_d RepositoryWithLogging) List(ctx context.Context, tx postgres.DBTX, orgSlug slug.Slug, projectSlug slug.Slug, environmentSlug slug.Slug, filters ListFilters) (rpa1 []*Result, err error)

List implements Repository.

type Result

type Result struct {
	Slug             slug.Slug
	OrgSlug          slug.Slug
	ProjectSlug      slug.Slug
	EnvironmentSlug  slug.Slug
	PipelineSlug     slug.Slug
	Source           string
	Valid            bool
	SpecHash         *string
	DiagnosticsJSONB []byte
	ImpactReportSlug *slug.Slug
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

Jump to

Keyboard shortcuts

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