drone/types/git.go
Johannes Batzill 5337c46a4f Add Query and Sorting Capability to ListBranches API (#42)
This change adds the following to the list branches api:
- 'query' parameter for querying branches using arbitrary substrings
- 'sort' parameter for sorting the branches (name and date supported)
- 'direction' parameter for specifing the direction of the sorted output
2022-10-21 20:45:26 -07:00

23 lines
675 B
Go

// Copyright 2022 Harness Inc. All rights reserved.
// Use of this source code is governed by the Polyform Free Trial License
// that can be found in the LICENSE.md file for this repository.
package types
import "github.com/harness/gitness/types/enum"
// CommitFilter stores commit query parameters.
type CommitFilter struct {
Page int `json:"page"`
Size int `json:"size"`
}
// BranchFilter stores commit query parameters.
type BranchFilter struct {
Query string `json:"query"`
Sort enum.BranchSortOption `json:"sort"`
Order enum.Order `json:"order"`
Page int `json:"page"`
Size int `json:"size"`
}