Documentation ¶
Index ¶
- type Change
- type FakeGerrit
- func (fg *FakeGerrit) AddAccount(account *gerrit.AccountInfo)
- func (fg *FakeGerrit) AddBranch(projectName, branchName string, branch *gerrit.BranchInfo)
- func (fg *FakeGerrit) AddChange(projectName string, change *gerrit.ChangeInfo)
- func (fg *FakeGerrit) GetAccount(id string) *gerrit.AccountInfo
- func (fg *FakeGerrit) GetBranch(projectName, branchID string) *gerrit.BranchInfo
- func (fg *FakeGerrit) GetChange(id string) *gerrit.ChangeInfo
- func (fg *FakeGerrit) GetChangesForProject(projectName string, start, desiredTotal int) []*gerrit.ChangeInfo
- func (fg *FakeGerrit) GetComments(id string) map[string][]*gerrit.CommentInfo
- func (fg *FakeGerrit) Reset()
- func (fg *FakeGerrit) SetSelf(id string) error
- type Project
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct { ChangeInfo *gerrit.ChangeInfo Comments map[string][]*gerrit.CommentInfo }
type FakeGerrit ¶
type FakeGerrit struct { Changes map[string]Change Accounts map[string]*gerrit.AccountInfo Projects map[string]*Project // contains filtered or unexported fields }
func NewFakeGerritClient ¶
func NewFakeGerritClient() *FakeGerrit
func (*FakeGerrit) AddAccount ¶
func (fg *FakeGerrit) AddAccount(account *gerrit.AccountInfo)
func (*FakeGerrit) AddBranch ¶
func (fg *FakeGerrit) AddBranch(projectName, branchName string, branch *gerrit.BranchInfo)
func (*FakeGerrit) AddChange ¶
func (fg *FakeGerrit) AddChange(projectName string, change *gerrit.ChangeInfo)
Add a change to Fake gerrit and keep track that the change belongs to the given project
func (*FakeGerrit) GetAccount ¶
func (fg *FakeGerrit) GetAccount(id string) *gerrit.AccountInfo
func (*FakeGerrit) GetBranch ¶
func (fg *FakeGerrit) GetBranch(projectName, branchID string) *gerrit.BranchInfo
func (*FakeGerrit) GetChange ¶
func (fg *FakeGerrit) GetChange(id string) *gerrit.ChangeInfo
func (*FakeGerrit) GetChangesForProject ¶
func (fg *FakeGerrit) GetChangesForProject(projectName string, start, desiredTotal int) []*gerrit.ChangeInfo
Returns changes from project with name `projectName“. Skips the first `start` number of ChangeIDs. `desiredTotal` caps the total to a number smaller or equal to the actual total number of ChangeIDs.
func (*FakeGerrit) GetComments ¶
func (fg *FakeGerrit) GetComments(id string) map[string][]*gerrit.CommentInfo
func (*FakeGerrit) Reset ¶
func (fg *FakeGerrit) Reset()
func (*FakeGerrit) SetSelf ¶
func (fg *FakeGerrit) SetSelf(id string) error
Click to show internal directories.
Click to hide internal directories.