Documentation ¶
Index ¶
Constants ¶
const Collection = "manifest"
Variables ¶
var ( // BSON fields for artifact file structs IdKey = bsonutil.MustHaveTag(Manifest{}, "Id") ManifestRevisionKey = bsonutil.MustHaveTag(Manifest{}, "Revision") ProjectNameKey = bsonutil.MustHaveTag(Manifest{}, "ProjectName") ModulesKey = bsonutil.MustHaveTag(Manifest{}, "Modules") ManifestBranchKey = bsonutil.MustHaveTag(Manifest{}, "Branch") ModuleBranchKey = bsonutil.MustHaveTag(Module{}, "Branch") ModuleRevisionKey = bsonutil.MustHaveTag(Module{}, "Revision") OwnerKey = bsonutil.MustHaveTag(Module{}, "Owner") UrlKey = bsonutil.MustHaveTag(Module{}, "URL") )
Functions ¶
func ByProjectAndRevision ¶
Types ¶
type Manifest ¶
type Manifest struct { Id string `json:"id" bson:"_id"` Revision string `json:"revision" bson:"revision"` ProjectName string `json:"project" bson:"project"` Branch string `json:"branch" bson:"branch"` Modules map[string]*Module `json:"modules" bson:"modules"` }
Manifest is a representation of the modules associated with the a version. Id is the version id, Revision is the revision of the version on the project ProjectName is the Project Identifier, Branch is the branch of the repository. Modules is a map of the GitHub repository name to the Module's information associated with the specific version.
func FindFromVersion ¶
func (*Manifest) TryInsert ¶
TryInsert writes the manifest to the database if possible. If the document already exists, it returns true and the error If it does not it will return false and the error
func (*Manifest) UpdateModuleRevision ¶
type Module ¶
type Module struct { Branch string `json:"branch" bson:"branch"` Repo string `json:"repo" bson:"repo"` Revision string `json:"revision" bson:"revision"` Owner string `json:"owner" bson:"owner"` URL string `json:"url" bson:"url"` }
A Module is a snapshot of the module associated with a version. Branch is the branch of the repository, Repo is the name of the repository, Revision is the revision of the head of the branch, Owner is the owner of the repository, URL is the url to the GitHub API call to that specific commit.