forked from jenkins-x/go-scm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
milestone.go
42 lines (34 loc) · 1.21 KB
/
milestone.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package scm
import (
"context"
"time"
)
type (
// MilestoneInput contains the information needed to create a milestone
MilestoneInput struct {
Title string
Description string
State string
DueDate *time.Time
}
// MilestoneListOptions provides options for querying a list of repository milestones.
MilestoneListOptions struct {
Page int
Size int
Open bool
Closed bool
}
// MilestoneService provides access to creating, listing, updating, and deleting milestones
MilestoneService interface {
// Find returns the milestone for the given number in the given repository
Find(context.Context, string, int) (*Milestone, *Response, error)
// List returns a list of milestones in the given repository
List(context.Context, string, MilestoneListOptions) ([]*Milestone, *Response, error)
// Create creates a milestone in the given repository
Create(context.Context, string, *MilestoneInput) (*Milestone, *Response, error)
// Update updates a milestone in the given repository
Update(context.Context, string, int, *MilestoneInput) (*Milestone, *Response, error)
// Delete deletes a milestone in the given repository
Delete(context.Context, string, int) (*Response, error)
}
)