Documentation
¶
Overview ¶
SPDX-License-Identifier: MIT Package gitlabclient retrieves commits from GitLab and normalizes them into the shared model types used by sting.
SPDX-License-Identifier: MIT
Index ¶
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 retrieves commits from GitLab for an author over a time window.
func New ¶
New builds a Client. token may be empty for public data. baseURL, when set, targets a GitLab API v4 root (e.g. "https://gitlab.example.com/api/v4/"). perPage is clamped to the API's 1-100 range. WithRequestBudget can install a fixed client ceiling; without it, Collect meters against Query.MaxRequests.
func (*Client) Cost ¶ added in v1.2.0
func (c *Client) Cost() model.CostReport
Cost reports requests consumed when the client was constructed with WithRequestBudget. Query results always carry their per-call cost, including the compatibility path for three-argument New calls.
type Option ¶ added in v1.2.0
type Option func(*Client)
Option configures a Client at construction time. New takes options variadically so existing three-argument callers remain source-compatible.
func WithRequestBudget ¶ added in v1.2.0
WithRequestBudget caps provider requests and enables cost accounting. A ceiling of 0 is intentionally uncapped but still accounted.