Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrEmptyGitHubAccessToken means "github access token is empty" ErrEmptyGitHubAccessToken = errors.New("github access token is empty") // ErrEmptyGitHubOwnerName means "github owner name is empty" ErrEmptyGitHubOwnerName = errors.New("github owner name is empty") // ErrEmptyRepositoryName means "github repository name is empty" ErrEmptyRepositoryName = errors.New("github repository name is empty") )
Functions ¶
func MinuteDiff ¶
Types ¶
type LTUsecase ¶
type LTUsecase struct {
// contains filtered or unexported fields
}
LTUsecase implement LeadTimeUsecase
func (*LTUsecase) Stat ¶
func (lt *LTUsecase) Stat(ctx context.Context, input *LeadTimeUsecaseStatInput) (*LeadTimeUsecaseStatOutput, error)
Stat return lead time statistics
type LeadTimeUsecase ¶
type LeadTimeUsecase interface {
Stat(ctx context.Context, input *LeadTimeUsecaseStatInput) (*LeadTimeUsecaseStatOutput, error)
}
LeadTimeUsecase is use cases for stat leadtime
func NewLeadTimeUsecase ¶
func NewLeadTimeUsecase(prService *service.PullRequestService, commitService *service.CommitService) LeadTimeUsecase
NewLeadTimeUsecase initialize LTUsecase
type LeadTimeUsecaseStatInput ¶
type LeadTimeUsecaseStatInput struct {
// Owner is GitHub account name
Owner string
// Repository is GitHub repository name
Repository string
}
LeadTimeUsecaseStatInput is input data for LeadTimeUsecase.Stat().
func (*LeadTimeUsecaseStatInput) Valid ¶
func (lt *LeadTimeUsecaseStatInput) Valid() error
Valid is input data validation
type LeadTimeUsecaseStatOutput ¶
type LeadTimeUsecaseStatOutput struct {
LeadTime *LeadTime
}
LeadTimeUsecaseStatOutput is output data for LeadTimeUsecase.Stat().
type PRUsecase ¶
type PRUsecase struct {
// contains filtered or unexported fields
}
PRUsecase implement PullRequestUsecase
func (*PRUsecase) List ¶
func (pr *PRUsecase) List(ctx context.Context, input *PRUsecaseListInput) (*PRUsecaseListOutput, error)
List return all pull request information in a repository.
type PRUsecaseListInput ¶
type PRUsecaseListInput struct {
// Owner is GitHub account name
Owner string
// Repository is GitHub repository name
Repository string
}
PRUsecaseListInput is input data for PRUsecase.List().
func (*PRUsecaseListInput) Valid ¶
func (pr *PRUsecaseListInput) Valid() error
Valid is input data validation
type PRUsecaseListOutput ¶
type PRUsecaseListOutput struct {
}
PRUsecaseListOutput is output data for PRUsecase.List().
type PullRequest ¶
type PullRequest struct {
Number int
State string
Title string
CreatedAt time.Time
ClosedAt time.Time
MergedAt time.Time
UserName string
}
PullRequest is PR information for presentation layer.
type PullRequestUsecase ¶
type PullRequestUsecase interface {
List(ctx context.Context, input *PRUsecaseListInput) (*PRUsecaseListOutput, error)
}
PullRequestUsecase is use cases for obtaining PR information.
func NewPullRequestUsecase ¶
func NewPullRequestUsecase(prService *service.PullRequestService) PullRequestUsecase
NewPullRequestUsecase initialize PRUsecase