Documentation ¶
Index ¶
- type Config
- type Instance
- type MockInstance
- func (_m *MockInstance) GetIssues(ctx context.Context, token *Token, jql string, startAt int, maxResults int) ([]jira.Issue, int, error)
- func (_m *MockInstance) GetName() string
- func (_m *MockInstance) GetProjects(ctx context.Context, token *Token) (*jira.ProjectList, error)
- func (_m *MockInstance) GetSelf(ctx context.Context, token *Token) (*jira.User, error)
- func (_m *MockInstance) GetURL() string
- func (_m *MockInstance) TokenFromCookie(r *http.Request) (*Token, error)
- func (_m *MockInstance) TokenToCookie(token *Token) (*http.Cookie, error)
- type NewMockInstanceT
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { URL string `json:"url"` Session auth.SessionConfig `json:"session"` }
Config is the structure of the configuration for a single GitHub instance.
type Instance ¶
type Instance interface { GetName() string GetURL() string TokenToCookie(token *Token) (*http.Cookie, error) TokenFromCookie(r *http.Request) (*Token, error) GetSelf(ctx context.Context, token *Token) (*jira.User, error) GetProjects(ctx context.Context, token *Token) (*jira.ProjectList, error) GetIssues(ctx context.Context, token *Token, jql string, startAt, maxResults int) ([]jira.Issue, int, error) }
type MockInstance ¶
MockInstance is an autogenerated mock type for the Instance type
func NewMockInstance ¶
func NewMockInstance(t NewMockInstanceT) *MockInstance
NewMockInstance creates a new instance of MockInstance. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockInstance) GetIssues ¶
func (_m *MockInstance) GetIssues(ctx context.Context, token *Token, jql string, startAt int, maxResults int) ([]jira.Issue, int, error)
GetIssues provides a mock function with given fields: ctx, token, jql, startAt, maxResults
func (*MockInstance) GetName ¶
func (_m *MockInstance) GetName() string
GetName provides a mock function with given fields:
func (*MockInstance) GetProjects ¶
func (_m *MockInstance) GetProjects(ctx context.Context, token *Token) (*jira.ProjectList, error)
GetProjects provides a mock function with given fields: ctx, token
func (*MockInstance) GetURL ¶
func (_m *MockInstance) GetURL() string
GetURL provides a mock function with given fields:
func (*MockInstance) TokenFromCookie ¶
func (_m *MockInstance) TokenFromCookie(r *http.Request) (*Token, error)
TokenFromCookie provides a mock function with given fields: r
func (*MockInstance) TokenToCookie ¶
func (_m *MockInstance) TokenToCookie(token *Token) (*http.Cookie, error)
TokenToCookie provides a mock function with given fields: token