dmitri.shuralyov.com/service/change

Rename ListCommitsOptions to GetDiffOptions.
dmitshur committed 6 years ago commit 289d31ac2173d2e8c99ba4829e17169c23d05aa2
Showing partial commit. Full Commit
Collapse all
changes.go
@@ -19,11 +19,11 @@ type Service interface {
	// Get a change.
	Get(ctx context.Context, repo string, id uint64) (Change, error)
	// ListCommits lists change commits.
	ListCommits(ctx context.Context, repo string, id uint64) ([]Commit, error)
	// Get a change diff.
	GetDiff(ctx context.Context, repo string, id uint64, opt *ListCommitsOptions) ([]byte, error)
	GetDiff(ctx context.Context, repo string, id uint64, opt *GetDiffOptions) ([]byte, error)

	// ListComments lists comments for specified change id.
	ListComments(ctx context.Context, repo string, id uint64, opt *ListCommentsOptions) ([]issues.Comment, error)
	// ListEvents lists events for specified change id.
	ListEvents(ctx context.Context, repo string, id uint64, opt *ListCommentsOptions) ([]issues.Event, error)
@@ -72,11 +72,11 @@ type StateFilter State
const (
	// AllStates is a state filter that includes all issues.
	AllStates StateFilter = "all"
)

type ListCommitsOptions struct {
type GetDiffOptions struct {
	// Commit is the commit ID of the commit to fetch.
	Commit string
}

// ListCommentsOptions controls pagination.