Documentation
¶
Index ¶
- type Client
- func (c *Client) FetchAllProjects(since *time.Time, membership bool) ([]model.Project, error)
- func (c *Client) FetchMemberProjects() (map[string]bool, error)
- func (c *Client) FetchStarredProjects() (map[string]bool, error)
- func (c *Client) GetCurrentUsername() (string, error)
- func (c *Client) TestConnection() error
- type GitLabClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the GitLab API client and implements GitLabClient interface
func (*Client) FetchAllProjects ¶
FetchAllProjects fetches all accessible projects from GitLab using parallel pagination If since is provided, only fetches projects with last_activity_after >= since (incremental sync) If membership is true, only fetches projects where the user is a member Returns a slice of Project structs containing path, name, starred, and archived information
func (*Client) FetchMemberProjects ¶ added in v0.3.2
FetchMemberProjects fetches all projects where the current user is a member Returns a map of project PathWithNamespace → true for O(1) lookup
func (*Client) FetchStarredProjects ¶ added in v0.2.9
FetchStarredProjects fetches all projects starred by the current user Returns a map of project PathWithNamespace → true for O(1) lookup
func (*Client) GetCurrentUsername ¶
GetCurrentUsername fetches the username of the authenticated user
func (*Client) TestConnection ¶
TestConnection tests the connection to GitLab by fetching current user
type GitLabClient ¶ added in v0.1.0
type GitLabClient interface {
FetchAllProjects(since *time.Time, membership bool) ([]model.Project, error)
TestConnection() error
GetCurrentUsername() (string, error)
}
GitLabClient defines the interface for GitLab API operations This interface enables mocking in tests while maintaining production functionality