Documentation
¶
Overview ¶
Package projects holds the data structures and logic necessary to interact with the Gitlab API and enumerate projects.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EnumerateProjectsOptions ¶
type EnumerateProjectsOptions struct { Mine bool `json:"mine"` Archived bool `json:"archived"` GroupID string `json:"group_id"` }
EnumerateProjectsOptions holds the options for enumerating projects. The Mine field is used to filter projects that are owned by the authenticated user, only returning projects that are owned by the authenticated user when set to true. The Archived field is used to filter for archived projects, including archived when set to true. The GroupID field is used to filter projects by group ID, only returning projects that are part of the specified group.
type GitlabResourceReport ¶
type GitlabResourceReport struct { BaseURL string `json:"base_url" yaml:"base_url"` Resources GitlabResources `json:"resources" yaml:"resources"` Errors []string `json:"errors" yaml:"errors"` }
GitlabResourceReport represents a report of Gitlab resources and non-fatal errors encountered during enumeration.
func EnumerateProjects ¶
func EnumerateProjects(ctx context.Context, baseURL string, options *EnumerateProjectsOptions, client *gitlab.Client) (*GitlabResourceReport, error)
EnumerateProjects enumerates projects using the provided Gitlab client and options. The function returns a GitlabResourceReport containing the resources and non-fatal errors encountered during the enumeration process.
func EnumerateProjectsForGroup ¶
func EnumerateProjectsForGroup(ctx context.Context, baseURL string, client *gitlab.Client, options *EnumerateProjectsOptions) (*GitlabResourceReport, error)
EnumerateProjectsForGroup enumerates projects for a specific group using the provided Gitlab client and options. The function returns a GitlabResourceReport containing the resources and non-fatal errors encountered during the enumeration process.
type GitlabResources ¶
type GitlabResources struct {
Projects []*gitlab.Project `json:"projects" yaml:"projects"`
}
GitlabResources represents a collection of Gitlab projects.