Documentation
¶
Index ¶
- type LoggerMock
- func (l *LoggerMock) Debugf(format string, args ...interface{})
- func (l *LoggerMock) Errorf(err error, format string, args ...interface{})
- func (l *LoggerMock) Infof(format string, args ...interface{})
- func (l *LoggerMock) New(fields log.Fields) log.Logger
- func (l *LoggerMock) Next() string
- func (l *LoggerMock) Warningf(format string, args ...interface{})
- func (l *LoggerMock) With(fields log.Fields) log.Logger
- type Memory
- func (s *Memory) Begin() error
- func (s *Memory) Cleanup(ctx context.Context, currentVersion int) error
- func (s *Memory) Commit() error
- func (s *Memory) Rollback() error
- func (s *Memory) SaveIssue(ctx context.Context, repositoryOwner, repositoryName string, ...) error
- func (s *Memory) SaveIssueComment(ctx context.Context, repositoryOwner, repositoryName string, issueNumber int, ...) error
- func (s *Memory) SaveOrganization(ctx context.Context, organization *graphql.Organization) error
- func (s *Memory) SavePullRequest(ctx context.Context, repositoryOwner, repositoryName string, ...) error
- func (s *Memory) SavePullRequestComment(ctx context.Context, repositoryOwner, repositoryName string, ...) error
- func (s *Memory) SavePullRequestReview(ctx context.Context, repositoryOwner, repositoryName string, ...) error
- func (s *Memory) SavePullRequestReviewComment(ctx context.Context, repositoryOwner, repositoryName string, ...) error
- func (s *Memory) SaveRepository(ctx context.Context, repository *graphql.RepositoryFields, topics []string) error
- func (s *Memory) SaveUser(ctx context.Context, orgID int, orgLogin string, user *graphql.UserExtended) error
- func (s *Memory) SetActiveVersion(ctx context.Context, v int) error
- func (s *Memory) Version(v int)
- type OrganizationTestOracle
- type RepositoryTestOracle
- type TestOracles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoggerMock ¶
type LoggerMock struct {
// contains filtered or unexported fields
}
func (*LoggerMock) Debugf ¶
func (l *LoggerMock) Debugf(format string, args ...interface{})
func (*LoggerMock) Errorf ¶
func (l *LoggerMock) Errorf(err error, format string, args ...interface{})
func (*LoggerMock) Infof ¶
func (l *LoggerMock) Infof(format string, args ...interface{})
func (*LoggerMock) New ¶
func (l *LoggerMock) New(fields log.Fields) log.Logger
func (*LoggerMock) Next ¶
func (l *LoggerMock) Next() string
func (*LoggerMock) Warningf ¶
func (l *LoggerMock) Warningf(format string, args ...interface{})
func (*LoggerMock) With ¶
func (l *LoggerMock) With(fields log.Fields) log.Logger
type Memory ¶
type Memory struct {
Organization *graphql.Organization
Repository *graphql.RepositoryFields
Topics []string
Users []*graphql.UserExtended
Issues []*graphql.Issue
IssueComments []*graphql.IssueComment
PRs []*graphql.PullRequest
PRComments []*graphql.IssueComment
PRReviews []*graphql.PullRequestReview
PRReviewComments []*graphql.PullRequestReviewComment
}
Memory implements the storer interface
func (*Memory) SaveIssue ¶
func (s *Memory) SaveIssue(ctx context.Context, repositoryOwner, repositoryName string, issue *graphql.Issue, assignees []string, labels []string) error
SaveIssue appends an issue to the issue list in memory
func (*Memory) SaveIssueComment ¶
func (s *Memory) SaveIssueComment(ctx context.Context, repositoryOwner, repositoryName string, issueNumber int, comment *graphql.IssueComment) error
SaveIssueComment appends an issue comment to the issue comments list in memory
func (*Memory) SaveOrganization ¶
SaveOrganization stores an organization in memory, it also initializes the list of users
func (*Memory) SavePullRequest ¶
func (s *Memory) SavePullRequest(ctx context.Context, repositoryOwner, repositoryName string, pr *graphql.PullRequest, assignees []string, labels []string) error
SavePullRequest appends an PR to the PR list in memory, also initializes the map for the review commnets for that particular PR
func (*Memory) SavePullRequestComment ¶
func (s *Memory) SavePullRequestComment(ctx context.Context, repositoryOwner, repositoryName string, pullRequestNumber int, comment *graphql.IssueComment) error
SavePullRequestComment appends an PR comment to the PR comment list in memory
func (*Memory) SavePullRequestReview ¶
func (s *Memory) SavePullRequestReview(ctx context.Context, repositoryOwner, repositoryName string, pullRequestNumber int, review *graphql.PullRequestReview) error
SavePullRequestReview appends a PR review to the PR review list in memory
func (*Memory) SavePullRequestReviewComment ¶
func (s *Memory) SavePullRequestReviewComment(ctx context.Context, repositoryOwner, repositoryName string, pullRequestNumber int, pullRequestReviewID int, comment *graphql.PullRequestReviewComment) error
SavePullRequestReviewComment appends a PR review comment to the PR review comments list in memory
func (*Memory) SaveRepository ¶
func (s *Memory) SaveRepository(ctx context.Context, repository *graphql.RepositoryFields, topics []string) error
SaveRepository stores a repository and its topics in memory and initializes PRs and PR comments
func (*Memory) SaveUser ¶
func (s *Memory) SaveUser(ctx context.Context, orgID int, orgLogin string, user *graphql.UserExtended) error
SaveUser appends a user to the user list in memory
func (*Memory) SetActiveVersion ¶
SetActiveVersion is a noop method at the moment
type OrganizationTestOracle ¶
type OrganizationTestOracle struct {
Org string `json:"org"`
Version int `json:"version"`
URL string `json:"url"`
CreatedAt string `json:"createdAt"`
PublicRepos int `json:"publicRepos"`
TotalPrivateRepos int `json:"totalPrivateRepos"`
NumOfUsers int `json:"numOfUsers"`
}
OrganizationTestOracle struct to hold a test oracle for an organization
type RepositoryTestOracle ¶
type RepositoryTestOracle struct {
Owner string `json:"owner"`
Repository string `json:"repository"`
Version int `json:"version"`
URL string `json:"url"`
Topics []string `json:"topics"`
CreatedAt string `json:"createdAt"`
IsPrivate bool `json:"isPrivate"`
IsArchived bool `json:"isArchived"`
HasWiki bool `json:"hasWiki"`
NumOfPRs int `json:"numOfPrs"`
NumOfPRComments int `json:"numOfPrComments"`
NumOfIssues int `json:"numOfIssues"`
NumOfIssueComments int `json:"numOfIssueComments"`
NumOfPRReviews int `json:"numOfPRReviews"`
NumOfPRReviewComments int `json:"numOfPRReviewComments"`
}
RepositoryTestOracle struct to hold a test oracle for a repository
type TestOracles ¶
type TestOracles struct {
RepositoryTestOracles []RepositoryTestOracle `json:",omitempty"`
OrganizationTestOracles []OrganizationTestOracle `json:",omitempty"`
}
TestOracles struct to hold the tests from json files