gitlab

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 6, 2026 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultBaseURL = "https://gitlab.com/"
	DefaultPerPage = 25
)

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	// contains filtered or unexported fields
}

func NewAPIError

func NewAPIError(endpointType string, err error) *APIError

func (*APIError) Error

func (e *APIError) Error() string

func (*APIError) Is

func (e *APIError) Is(err error) bool

func (*APIError) Unwrap

func (e *APIError) Unwrap() error

type Client

type Client interface {
	ListMergeRequests(IIDs []int64, perPage int) ([]MergeRequest, error)
}

func NewClient

func NewClient(privateToken string, projectID string) (Client, error)

func NewClientWithBaseURL

func NewClientWithBaseURL(privateToken string, projectID string, baseURL string) (Client, error)

type ClientNotCreatedError

type ClientNotCreatedError struct {
	// contains filtered or unexported fields
}

func NewClientNotCreatedError

func NewClientNotCreatedError(err error) *ClientNotCreatedError

func (*ClientNotCreatedError) Error

func (e *ClientNotCreatedError) Error() string

func (*ClientNotCreatedError) Is

func (e *ClientNotCreatedError) Is(err error) bool

func (*ClientNotCreatedError) Unwrap

func (e *ClientNotCreatedError) Unwrap() error

type MergeRequest

type MergeRequest struct {
	IID    int64
	Title  string
	Labels []string
	URL    string

	AuthorName   string
	AuthorHandle string
}

func (MergeRequest) Author

func (mr MergeRequest) Author() string

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient added in v0.7.0

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClient) ListMergeRequests

func (_m *MockClient) ListMergeRequests(IIDs []int64, perPage int) ([]MergeRequest, error)

ListMergeRequests provides a mock function with given fields: IIDs, perPage

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL