yolostore

package
v2.110.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildListFilters

type BuildListFilters struct {
	Entities []*yolopb.Entity
	Projects []*yolopb.Project
}

type GetBuildListOpts

type GetBuildListOpts struct {
	ArtifactID           []string
	ArtifactKinds        []yolopb.Artifact_Kind
	WithArtifact         bool
	BuildID              []string
	BuildState           []yolopb.Build_State
	BuildDriver          []yolopb.Driver
	ProjectID            []string
	MergeRequestID       []string
	MergeRequestAuthorID []string
	MergeRequestState    []yolopb.MergeRequest_State
	Branch               []string
	Limit                int32
	SortByCommitDate     bool
}

type Store

type Store interface {
	// artifacts store
	GetArtifactByID(id string) (*yolopb.Artifact, error)
	GetAllArtifactsWithoutBundleID() ([]*yolopb.Artifact, error)
	SaveArtifact(artifact *yolopb.Artifact) error

	// build store
	GetBuildListFilters() (*BuildListFilters, error)
	GetLastBuild(driver yolopb.Driver) (*yolopb.Build, error)
	GetBuildList(bl GetBuildListOpts) ([]*yolopb.Build, error)

	// batch store
	GetBatchWithPreloading() (*yolopb.Batch, error)
	GetBatch() (*yolopb.Batch, error)
	SaveBatch(batch *yolopb.Batch) error

	// download store
	GetDumpWithPreloading() ([]*yolopb.Download, error)
	CreateDownload(download *yolopb.Download) error

	// internal
	DB() *gorm.DB
}

func NewStore

func NewStore(db *gorm.DB, logger *zap.Logger) (Store, error)

Jump to

Keyboard shortcuts

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