{"modulePath":"github.com/tychoish/evergreen","version":"v0.0.0-20190926012200-418c65a2a951","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package commitqueue\n\n## Constants\n\n```go\nconst (\n\tPRPatchType  = \"PR\"\n\tCLIPatchType = \"CLI\"\n)\n```\n\n```go\nconst Collection = \"commit_queue\"\n```\n\n```go\nconst Context = \"evergreen/commitqueue\"\n```\n\n## Variables\n\n```go\nvar (\n\t// bson fields for the CommitQueue struct\n\tIdKey          = bsonutil.MustHaveTag(CommitQueue{}, \"ProjectID\")\n\tQueueKey       = bsonutil.MustHaveTag(CommitQueue{}, \"Queue\")\n\tProcessingKey  = bsonutil.MustHaveTag(CommitQueue{}, \"Processing\")\n\tIssueKey       = bsonutil.MustHaveTag(CommitQueueItem{}, \"Issue\")\n\tVersionKey     = bsonutil.MustHaveTag(CommitQueueItem{}, \"Version\")\n\tEnqueueTimeKey = bsonutil.MustHaveTag(CommitQueueItem{}, \"EnqueueTime\")\n)\n```\n\n## Functions\n\n```go\nfunc ClearAllCommitQueues() (int, error)\n```\n\n```go\nfunc InsertQueue(q *CommitQueue) error\n```\n\n```go\nfunc NewCommitQueueDequeueLogger(name string, l send.LevelInfo) (send.Sender, error)\n```\nNewCommitQueueDequeueLogger constructs a Sender that dequeues an item from a commit queue\n\n```go\nfunc NewDequeueItemMessage(p level.Priority, dequeueMsg DequeueItem) message.Composer\n```\nNewDequeueItemMessage returns a composer for DequeueItem messages\n\n```go\nfunc NewGithubMergePRMessage(p level.Priority, mergeMsg GithubMergePR) message.Composer\n```\nNewGithubMergePRMessage returns a composer for GithubMergePR messages\n\n```go\nfunc NewGithubPRLogger(ctx context.Context, name string, token string, statusSender send.Sender) (send.Sender, error)\n```\nNewGithubPRLogger creates a new Sender implementation that merges a pull request Specify an OAuth token for GitHub authentication\n\n```go\nfunc NewMockGithubPRLogger(name string, errLogger *mockErrorLogger) (send.Sender, error)\n```\nMock implementation\n\n```go\nfunc SetupEnv(env evergreen.Environment) error\n```\n\n```go\nfunc TriggersCommitQueue(commentAction string, comment string) bool\n```\n\n## Types\n\n```go\ntype CommitQueue struct {\n\tProjectID  string            `bson:\"_id\"`\n\tProcessing bool              `bson:\"processing\"`\n\tQueue      []CommitQueueItem `bson:\"queue,omitempty\"`\n}\n```\n\n```go\nfunc FindOneId(id string) (*CommitQueue, error)\n```\n\n```go\nfunc (q *CommitQueue) Enqueue(item CommitQueueItem) (int, error)\n```\n\n```go\nfunc (q *CommitQueue) FindItem(issue string) int\n```\n\n```go\nfunc (q *CommitQueue) MarshalBSON() ([]byte, error)\n```\n\n```go\nfunc (q *CommitQueue) Next() *CommitQueueItem\n```\n\n```go\nfunc (q *CommitQueue) Remove(issue string) (bool, error)\n```\n\n```go\nfunc (q *CommitQueue) SetProcessing(status bool) error\n```\n\n```go\nfunc (q *CommitQueue) UnmarshalBSON(in []byte) error\n```\n\n```go\nfunc (q *CommitQueue) UpdateVersion(item CommitQueueItem) error\n```\n\n```go\ntype CommitQueueItem struct {\n\tIssue       string    `bson:\"issue\"`\n\tVersion     string    `bson:\"version,omitempty\"`\n\tEnqueueTime time.Time `bson:\"enqueue_time\"`\n\tModules     []Module  `bson:\"modules\"`\n}\n```\n\n```go\nfunc (i *CommitQueueItem) MarshalBSON() ([]byte, error)\n```\n\n```go\nfunc (i *CommitQueueItem) UnmarshalBSON(in []byte) error\n```\n\n```go\ntype DequeueItem struct {\n\tProjectID string\n\tItem      string\n\tStatus    string\n}\n```\n\n```go\ntype GithubMergePR struct {\n\tStatus      string         `bson:\"status\"`\n\tPatchID     string         `bson:\"patch_id\"`\n\tURL         string         `bson:\"url\"`\n\tProjectID   string         `bson:\"project_id\"`\n\tMergeMethod string         `bson:\"merge_method\"`\n\tItem        string         `bson:\"item\"`\n\tPRs         []event.PRInfo `bson:\"prs\"`\n}\n```\n\n```go\nfunc (m *GithubMergePR) MarshalBSON() ([]byte, error)\n```\n\n```go\nfunc (m *GithubMergePR) UnmarshalBSON(in []byte) error\n```\n\n```go\nfunc (p *GithubMergePR) Valid() error\n```\nValid returns nil if the message is well formed\n\n```go\ntype Module struct {\n\tModule string `bson:\"module\" json:\"module\"`\n\tIssue  string `bson:\"issue\" json:\"issue\"`\n}\n```\n\n```go\nfunc (m *Module) MarshalBSON() ([]byte, error)\n```\n\n```go\nfunc (m *Module) UnmarshalBSON(in []byte) error\n```\n\n","path":"github.com/tychoish/evergreen/model/commitqueue","name":"commitqueue","synopsis":"","isRedistributable":true}
