Documentation
¶
Overview ¶
Package usecase provides application use cases.
For the Dependency Rule it is not allowed to import platform.
Something to clean up in the future: the current usecase for getting statistics is tightly coupled with the github library and thus coupled to github data structures. We should consider to either use generic data structures so we abstract away from the platform and the library, or we should make the usecase github specific.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetStatistics ¶
type GetStatistics struct {
// contains filtered or unexported fields
}
func NewGetStatistics ¶
func NewGetStatistics(githubDataFinder GithubDataFinder, logger *zap.Logger) *GetStatistics
func (*GetStatistics) GetStatistics ¶
func (g *GetStatistics) GetStatistics( ctx context.Context, from time.Time, to time.Time, delta time.Duration, organization string, repositories []string, userHandles []string, ) (*statistics.Statistics, error)
type GithubDataFinder ¶
type GithubDataFinderMock ¶
type GithubDataFinderMock struct {
FetchAllForFunc func(
ctx context.Context,
from time.Time,
to time.Time,
delta time.Duration,
organization string,
repositories []string,
) ([]*github.PullRequest, []*github.RepositoryCommit, []*github.PullRequestComment, error)
}
func (*GithubDataFinderMock) FetchAllFor ¶
func (g *GithubDataFinderMock) FetchAllFor( ctx context.Context, from time.Time, to time.Time, delta time.Duration, organization string, repositories []string, ) ([]*github.PullRequest, []*github.RepositoryCommit, []*github.PullRequestComment, error)
Click to show internal directories.
Click to hide internal directories.