Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotExist = errors.New("does not exist")
ErrNotExist indicates that a record does not exist
Functions ¶
This section is empty.
Types ¶
type Application ¶
Application stores the name of the Application
func (*Application) NameLower ¶
func (a *Application) NameLower() string
NameLower returns the app of the name in lowercase
type Build ¶
type Build struct { ID int Application Application VCSState VCSState StartTimeStamp time.Time StopTimeStamp time.Time TotalInputDigest string Outputs []*Output Inputs []*Input }
Build represents a stored build
type Issue ¶
type Issue string
Issue describes an issue in the build database
const ( // IssueOutputDigestMissing describes that a build didn't produces an // output that other builds with the same input digest produced IssueOutputDigestMissing Issue = "output with digest missing" // IssueUnmatchedDigest describes that a build produced an output with // a different digest then other builds with the same inputs IssueUnmatchedDigest Issue = "output with different digest" )
type Output ¶
type Output struct { Name string Type OutputType Digest string SizeBytes int64 Upload Upload }
Output represents a build output
type OutputType ¶
type OutputType string
OutputType describes the type of an artifact
const ( //DockerOutput is a docker container artifact DockerOutput OutputType = "docker" //S3Output is a file artifact stored on S3 S3Output OutputType = "s3" )
type Storer ¶
type Storer interface { GetLatestBuildByDigest(appName, totalInputDigest string) (*Build, error) Save(b *Build) error GetBuildWithoutInputs(id int) (*Build, error) GetApps() ([]*Application, error) GetSameTotalInputDigestsForAppBuilds(appName string, startTs time.Time) ([]string, error) GetAppBuildsByInputDigest(appName, totalInputDigest string) ([]*Build, error) }
Storer is an interface for persisting informations about builds
type VerifyIssue ¶
VerifyIssue describes a found issue during verification
func VerifySameInputDigestSameOutputs ¶
func VerifySameInputDigestSameOutputs(clt Storer, appName string, startTs time.Time) ([]*VerifyIssue, error)
VerifySameInputDigestSameOutputs if the application has multiple builds with the same total input digest, it finds the most common outputs by digest from those builds and checks if the other builds have the outputs with the same digest. For builds that don't match an Issue description is returned