Documentation ¶
Index ¶
- Constants
- type FakeClient
- func (f *FakeClient) AddComment(issueID string, comment *jira.Comment) (*jira.Comment, error)
- func (f *FakeClient) AddRemoteLink(id string, link *jira.RemoteLink) (*jira.RemoteLink, error)
- func (f *FakeClient) CloneIssue(issue *jira.Issue) (*jira.Issue, error)
- func (f *FakeClient) CreateIssue(issue *jira.Issue) (*jira.Issue, error)
- func (f *FakeClient) CreateIssueLink(link *jira.IssueLink) error
- func (f *FakeClient) DeleteLink(id string) error
- func (f *FakeClient) DeleteRemoteLink(issueID string, linkID int) error
- func (f *FakeClient) DeleteRemoteLinkViaURL(issueID, url string) (bool, error)
- func (f *FakeClient) DoTransition(issueID, transitionID string) error
- func (f *FakeClient) FindUser(property string) ([]*jira.User, error)
- func (f *FakeClient) ForPlugin(string) jiraclient.Client
- func (f *FakeClient) GetIssue(id string) (*jira.Issue, error)
- func (f *FakeClient) GetIssueQaContact(issue *jira.Issue) (*jira.User, error)
- func (f *FakeClient) GetIssueSecurityLevel(issue *jira.Issue) (*jiraclient.SecurityLevel, error)
- func (f *FakeClient) GetIssueTargetVersion(issue *jira.Issue) (*[]*jira.Version, error)
- func (f *FakeClient) GetProjectVersions(project string) ([]*jira.Version, error)
- func (f *FakeClient) GetRemoteLinks(id string) ([]jira.RemoteLink, error)
- func (f *FakeClient) GetTransitions(issueID string) ([]jira.Transition, error)
- func (f *FakeClient) JiraClient() *jira.Client
- func (f *FakeClient) JiraURL() string
- func (f *FakeClient) ListProjects() (*jira.ProjectList, error)
- func (f *FakeClient) SearchWithContext(ctx context.Context, jql string, options *jira.SearchOptions) ([]jira.Issue, *jira.Response, error)
- func (f *FakeClient) UpdateIssue(issue *jira.Issue) (*jira.Issue, error)
- func (f *FakeClient) UpdateRemoteLink(id string, link *jira.RemoteLink) error
- func (f *FakeClient) UpdateStatus(issueID, statusName string) error
- func (f *FakeClient) Used() bool
- func (f *FakeClient) WithFields(fields logrus.Fields) jiraclient.Client
- type SearchRequest
- type SearchResponse
Constants ¶
View Source
const FakeJiraUrl = "https://my-jira.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeClient ¶
type FakeClient struct { Issues []*jira.Issue ExistingLinks map[string][]jira.RemoteLink NewLinks []jira.RemoteLink RemovedLinks []jira.RemoteLink IssueLinks []*jira.IssueLink GetIssueError map[string]error CreateIssueError map[string]error UpdateIssueError map[string]error Transitions []jira.Transition Users []*jira.User SearchResponses map[SearchRequest]SearchResponse ProjectVersions map[string][]*jira.Version }
func (*FakeClient) AddComment ¶
func (f *FakeClient) AddComment(issueID string, comment *jira.Comment) (*jira.Comment, error)
func (*FakeClient) AddRemoteLink ¶
func (f *FakeClient) AddRemoteLink(id string, link *jira.RemoteLink) (*jira.RemoteLink, error)
func (*FakeClient) CloneIssue ¶
func (f *FakeClient) CloneIssue(issue *jira.Issue) (*jira.Issue, error)
func (*FakeClient) CreateIssue ¶
func (f *FakeClient) CreateIssue(issue *jira.Issue) (*jira.Issue, error)
func (*FakeClient) CreateIssueLink ¶
func (f *FakeClient) CreateIssueLink(link *jira.IssueLink) error
func (*FakeClient) DeleteLink ¶
func (f *FakeClient) DeleteLink(id string) error
func (*FakeClient) DeleteRemoteLink ¶
func (f *FakeClient) DeleteRemoteLink(issueID string, linkID int) error
TODO: improve handling of remote links in fake client; having a separate NewLinks struct that contains links not in existingLinks may limit some aspects of testing
func (*FakeClient) DeleteRemoteLinkViaURL ¶
func (f *FakeClient) DeleteRemoteLinkViaURL(issueID, url string) (bool, error)
func (*FakeClient) DoTransition ¶
func (f *FakeClient) DoTransition(issueID, transitionID string) error
func (*FakeClient) FindUser ¶
func (f *FakeClient) FindUser(property string) ([]*jira.User, error)
func (*FakeClient) ForPlugin ¶
func (f *FakeClient) ForPlugin(string) jiraclient.Client
func (*FakeClient) GetIssue ¶
func (f *FakeClient) GetIssue(id string) (*jira.Issue, error)
func (*FakeClient) GetIssueQaContact ¶
func (f *FakeClient) GetIssueQaContact(issue *jira.Issue) (*jira.User, error)
func (*FakeClient) GetIssueSecurityLevel ¶
func (f *FakeClient) GetIssueSecurityLevel(issue *jira.Issue) (*jiraclient.SecurityLevel, error)
func (*FakeClient) GetIssueTargetVersion ¶
func (f *FakeClient) GetIssueTargetVersion(issue *jira.Issue) (*[]*jira.Version, error)
func (*FakeClient) GetProjectVersions ¶
func (f *FakeClient) GetProjectVersions(project string) ([]*jira.Version, error)
func (*FakeClient) GetRemoteLinks ¶
func (f *FakeClient) GetRemoteLinks(id string) ([]jira.RemoteLink, error)
func (*FakeClient) GetTransitions ¶
func (f *FakeClient) GetTransitions(issueID string) ([]jira.Transition, error)
func (*FakeClient) JiraClient ¶
func (f *FakeClient) JiraClient() *jira.Client
func (*FakeClient) JiraURL ¶
func (f *FakeClient) JiraURL() string
func (*FakeClient) ListProjects ¶
func (f *FakeClient) ListProjects() (*jira.ProjectList, error)
func (*FakeClient) SearchWithContext ¶
func (f *FakeClient) SearchWithContext(ctx context.Context, jql string, options *jira.SearchOptions) ([]jira.Issue, *jira.Response, error)
func (*FakeClient) UpdateIssue ¶
func (f *FakeClient) UpdateIssue(issue *jira.Issue) (*jira.Issue, error)
func (*FakeClient) UpdateRemoteLink ¶
func (f *FakeClient) UpdateRemoteLink(id string, link *jira.RemoteLink) error
func (*FakeClient) UpdateStatus ¶
func (f *FakeClient) UpdateStatus(issueID, statusName string) error
func (*FakeClient) Used ¶
func (f *FakeClient) Used() bool
func (*FakeClient) WithFields ¶
func (f *FakeClient) WithFields(fields logrus.Fields) jiraclient.Client
type SearchRequest ¶
type SearchRequest struct {
// contains filtered or unexported fields
}
type SearchResponse ¶
type SearchResponse struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.