Files
android_development/tools/repo_diff/service/repodiff/controllers/contract.go
Scott Lobdell ceb0b6a273 Complete functionality to add the first seen timestamp to non-upstreamed
commits

Test: Unit tests included, running locally
Change-Id: I0b2fd022a37c2d35ee46127ae17a06bf66580500
2018-05-14 14:26:32 -07:00

21 lines
550 B
Go

package controllers
import (
ent "repodiff/entities"
"repodiff/repositories"
)
type Committer interface {
InsertCommitRows(commitRows []ent.AnalyzedCommitRow) error
GetFirstSeenTimestamp(commitHashes []string, nullTimestamp ent.RepoTimestamp) (map[string]ent.RepoTimestamp, error)
GetMostRecentCommits() ([]ent.AnalyzedCommitRow, error)
}
func MaybeNullObjectCommitRepository(target ent.MappedDiffTarget) Committer {
c, err := repositories.NewCommitRepository(target)
if err != nil {
return repositories.NewNullObject(err)
}
return c
}