sqlite3

package
v0.0.0-...-8a25d1e Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildDAO

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

BuildDAO provides access to the collection of Builds.

func NewBuildDAO

func NewBuildDAO(db *sqlx.DB) *BuildDAO

NewBuildDAO creates a new Build data access object.

func (*BuildDAO) Bootstrap

func (b *BuildDAO) Bootstrap() error

Bootstrap creates the necessary table to operate builds.

func (*BuildDAO) GetLastBuild

func (b *BuildDAO) GetLastBuild(repoFullName string) (*models.Build, error)

GetLastBuild loads last known build for a repository.

func (*BuildDAO) ListByRepoFullName

func (b *BuildDAO) ListByRepoFullName(repoFullName string) ([]*models.Build, error)

ListByRepoFullName all builds for a repository

func (*BuildDAO) MarkComplete

func (b *BuildDAO) MarkComplete(build *models.Build) error

MarkComplete determines a build has completed and update its build information in the database.

func (*BuildDAO) MarkInProgress

func (b *BuildDAO) MarkInProgress(build *models.Build) error

MarkInProgress determines a build has started and update its build information in the database.

func (*BuildDAO) Register

func (b *BuildDAO) Register(build *models.Build) (*models.Build, error)

Register stores an new build in the database.

func (*BuildDAO) SweepExpired

func (b *BuildDAO) SweepExpired(timeout time.Duration) (int64, error)

SweepExpired mark expired builds as failed.

Jump to

Keyboard shortcuts

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