blob: 8cbc84c9c2fa1e4b8a5e26955adf760a658d0e8d [file] [log] [blame]
package source
import "time"
// Artifact is a single item we found during a search.
type Artifact struct {
Title string `json:"title"`
URL string `json:"url"`
Hashtags []string `json:"hashtags"`
LastModified time.Time `json:"last_modified"`
}
// Source is the interface each source of data must implement, i.e. Gerrit,
// Monorail, Drive, etc.
type Source interface {
// ByHashtag returns a channel that produces Artifacts that match the given
// hashtag.
ByHashtag(hashtag string) <-chan Artifact
// ByUSer returns a channel that produces Artifacts that match the given
// email.
ByUser(email string) <-chan Artifact
}