Documentation ¶
Overview ¶
Package engine provides implementations of the git engine client.
Index ¶
- type Gitlab
- type Interface
- type InterfaceWithTracing
- func (_d InterfaceWithTracing) Approve(ctx context.Context, projectID string, number int) (err error)
- func (_d InterfaceWithTracing) GetCurrentUser(ctx context.Context) (u1 git.User, err error)
- func (_d InterfaceWithTracing) ListPullRequests(ctx context.Context, req ListPRsRequest) (pa1 []git.PullRequest, err error)
- type ListPRsRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Gitlab ¶
type Gitlab struct {
// contains filtered or unexported fields
}
Gitlab implements Interface for Gitlab.
func (*Gitlab) GetCurrentUser ¶
GetCurrentUser returns the current user.
func (*Gitlab) ListPullRequests ¶
func (g *Gitlab) ListPullRequests(ctx context.Context, req ListPRsRequest) ([]git.PullRequest, error)
ListPullRequests lists pull requests.
type Interface ¶
type Interface interface { // ListPullRequests lists pull requests. ListPullRequests(ctx context.Context, req ListPRsRequest) ([]git.PullRequest, error) // GetCurrentUser returns the current user. GetCurrentUser(ctx context.Context) (git.User, error) // Approve approves the pull request. Approve(ctx context.Context, projectID string, number int) error }
Interface defines methods each git engine client should implement.
type InterfaceWithTracing ¶
type InterfaceWithTracing struct { Interface // contains filtered or unexported fields }
InterfaceWithTracing implements Interface interface instrumented with opentracing spans
func NewInterfaceWithTracing ¶
func NewInterfaceWithTracing(base Interface, instance string, spanDecorator ...func(span trace.Span, params, results map[string]interface{})) InterfaceWithTracing
NewInterfaceWithTracing returns InterfaceWithTracing
func (InterfaceWithTracing) Approve ¶ added in v0.17.0
func (_d InterfaceWithTracing) Approve(ctx context.Context, projectID string, number int) (err error)
Approve implements Interface
func (InterfaceWithTracing) GetCurrentUser ¶
GetCurrentUser implements Interface
func (InterfaceWithTracing) ListPullRequests ¶
func (_d InterfaceWithTracing) ListPullRequests(ctx context.Context, req ListPRsRequest) (pa1 []git.PullRequest, err error)
ListPullRequests implements Interface
type ListPRsRequest ¶
type ListPRsRequest struct { State git.State Labels misc.Filter[string] Sort misc.Sort Pagination misc.Pagination }
ListPRsRequest is a request to list pull requests. Bools with pointers are used to specify whether to include (true) or exclude (false) pull requests with a specific state. If a pointer is nil, pull requests with the corresponding state are not filtered.