Documentation
¶
Index ¶
- type Client
- func (c *Client) DeleteRunner(runnerID int) error
- func (c *Client) GetRunnerDetails(runnerID int) (*RunnerDetails, error)
- func (c *Client) GetRunnerJobs(runnerID int, status string, limit int) ([]Job, error)
- func (c *Client) ListJobs(w io.Writer, start time.Time) ([]Job, error)
- func (c *Client) ListRunners(tagFilters string, typeFilters string) ([]Runner, error)
- func (c *Client) PauseRunner(runnerID int) error
- func (c *Client) UnpauseRunner(runnerID int) error
- type Job
- type Runner
- type RunnerDetails
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 represents a GitLab API client
func (*Client) DeleteRunner ¶
DeleteRunner deletes a runner by ID from the GitLab instance. Note: This requires admin or owner permissions for the runner.
func (*Client) GetRunnerDetails ¶
func (c *Client) GetRunnerDetails(runnerID int) (*RunnerDetails, error)
GetRunnerDetails fetches detailed information about a specific runner by ID.
func (*Client) GetRunnerJobs ¶
GetRunnerJobs retrieves jobs for a specific runner with optional status filter. status can be "running", "success", "failed", "canceled", or empty for all
func (*Client) ListRunners ¶
ListRunners retrieves all runners for a gitlab project. all enabled runners for the project are listed.
func (*Client) PauseRunner ¶
PauseRunner pauses a runner by ID.
func (*Client) UnpauseRunner ¶
UnpauseRunner unpauses a runner by ID.
type Job ¶
type Job struct {
ID int `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
Duration float64 `json:"duration"`
Pipeline struct {
ID int `json:"id"`
} `json:"pipeline"`
Branch string `json:"ref"`
URL string `json:"web_url"`
Runner *struct {
ID int `json:"id"`
Description string `json:"description"`
} `json:"runner,omitempty"`
}
Job represents a GitLab CI job
type Runner ¶
type Runner struct {
ID int `json:"id"`
Description string `json:"description"`
Active bool `json:"active"`
Paused bool `json:"paused"`
RunnerType string `json:"runner_type"`
Name string `json:"name,omitempty"`
Online bool `json:"online"`
Status string `json:"status"`
IPAddress string `json:"ip_address"`
}
Runner represents a GitLab CI runner
type RunnerDetails ¶
type RunnerDetails struct {
Active bool `json:"active"`
Paused bool `json:"paused"`
Architecture string `json:"architecture,omitempty"`
Description string `json:"description"`
ID int `json:"id"`
IPAddress string `json:"ip_address"`
RunnerType string `json:"runner_type"`
ContactedAt time.Time `json:"contacted_at"`
MaintenanceNote string `json:"maintenance_note,omitempty"`
Name string `json:"name,omitempty"`
Online bool `json:"online"`
Status string `json:"status"`
Platform string `json:"platform,omitempty"`
Projects []struct {
ID int `json:"id"`
Name string `json:"name"`
NameWithNamespace string `json:"name_with_namespace"`
Path string `json:"path"`
PathWithNamespace string `json:"path_with_namespace"`
} `json:"projects"`
Revision string `json:"revision,omitempty"`
TagList []string `json:"tag_list"`
Version string `json:"version,omitempty"`
AccessLevel string `json:"access_level"`
MaximumTimeout int `json:"maximum_timeout"`
}
RunnerDetails represents detailed information about a GitLab CI runner.