{"modulePath":"github.com/Method-Security/gitlabctl","version":"v0.0.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package projects\n\nPackage projects holds the data structures and logic necessary to interact with the Gitlab API and enumerate projects.\n\n## Functions\n\n```go\nfunc FindGroupByName(ctx context.Context, client *gitlab.Client, groupName string) (*gitlab.Group, error)\n```\nFindGroupByName searches for a group by name using the provided Gitlab client. If the group is found, it is returned. If the group is not found, an error is returned.\n\n## Types\n\n```go\ntype EnumerateProjectsOptions struct {\n\tMine     bool   `json:\"mine\"`\n\tArchived bool   `json:\"archived\"`\n\tGroupID  string `json:\"group_id\"`\n}\n```\nEnumerateProjectsOptions 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.\n\n```go\ntype GitlabResourceReport struct {\n\tBaseURL   string          `json:\"base_url\" yaml:\"base_url\"`\n\tResources GitlabResources `json:\"resources\" yaml:\"resources\"`\n\tErrors    []string        `json:\"errors\" yaml:\"errors\"`\n}\n```\nGitlabResourceReport represents a report of Gitlab resources and non-fatal errors encountered during enumeration.\n\n```go\nfunc EnumerateProjects(ctx context.Context, baseURL string, options *EnumerateProjectsOptions, client *gitlab.Client) (*GitlabResourceReport, error)\n```\nEnumerateProjects 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.\n\n```go\nfunc EnumerateProjectsForGroup(ctx context.Context, baseURL string, client *gitlab.Client, options *EnumerateProjectsOptions) (*GitlabResourceReport, error)\n```\nEnumerateProjectsForGroup 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.\n\n```go\ntype GitlabResources struct {\n\tProjects []*gitlab.Project `json:\"projects\" yaml:\"projects\"`\n}\n```\nGitlabResources represents a collection of Gitlab projects.\n\n","path":"github.com/Method-Security/gitlabctl/internal/projects","name":"projects","synopsis":"Package projects holds the data structures and logic necessary to interact with the Gitlab API and enumerate projects.","isRedistributable":true}
