{"modulePath":"github.com/CompassSecurity/pipeleek","version":"v1.5.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package util\n\n## Functions\n\n```go\nfunc AccessLevelHelpText() string\n```\nAccessLevelHelpText describes the supported named and numeric access levels.\n\n```go\nfunc AccessLevelName(level gitlab.AccessLevelValue) string\n```\nAccessLevelName returns the human-readable name for a GitLab access level value.\n\n```go\nfunc CookieSessionValid(gitlabUrl string, cookieVal string)\n```\n\n```go\nfunc DetermineVersion(gitlabUrl string, apiToken string) *gitlab.Metadata\n```\n\n```go\nfunc FetchCICDYml(git *gitlab.Client, pid int64) (string, error)\n```\n\n```go\nfunc GetGitlabClient(token string, url string) (*gitlab.Client, error)\n```\n\n```go\nfunc IterateGroupProjects(client *gitlab.Client, groupID interface{}, opts *gitlab.ListGroupProjectsOptions, callback ProjectIteratorFunc) error\n```\nIterateGroupProjects loops through group projects with pagination and calls the provided callback function for each project. Returns an error if project fetching fails.\n\n```go\nfunc IterateProjects(client *gitlab.Client, opts *gitlab.ListProjectsOptions, callback ProjectIteratorFunc) error\n```\nIterateProjects loops through projects with pagination and calls the provided callback function for each project. Returns an error if project fetching fails.\n\n```go\nfunc ListAllUsers(git *gitlab.Client) ([]*gitlab.User, *gitlab.Response, error)\n```\nListAllUsers pages through /api/v4/users and returns all users found. It returns the last API response on error to allow callers to inspect HTTP status codes.\n\n```go\nfunc ParseAccessLevel(value string) (gitlab.AccessLevelValue, error)\n```\nParseAccessLevel converts a user-facing access level string into a GitLab access level value. It accepts documented names such as \"developer\" or \"security-manager\" and also numeric values.\n\n```go\nfunc RegisterNewAccount(targetUrl string, username string, password string, email string)\n```\n\n## Types\n\n```go\ntype ProjectIteratorFunc func(project *gitlab.Project) error\n```\nProjectIteratorFunc is a callback function type for processing each project\n\n```go\ntype SelfToken struct {\n\tID          int       `json:\"id\"`\n\tName        string    `json:\"name\"`\n\tRevoked     bool      `json:\"revoked\"`\n\tCreatedAt   time.Time `json:\"created_at\"`\n\tDescription string    `json:\"description\"`\n\tScopes      []string  `json:\"scopes\"`\n\tUserID      int       `json:\"user_id\"`\n\tLastUsedAt  time.Time `json:\"last_used_at\"`\n\tActive      bool      `json:\"active\"`\n\tExpiresAt   string    `json:\"expires_at\"`\n\tLastUsedIps []string  `json:\"last_used_ips\"`\n}\n```\nSelfToken represents the current personal access token details returned by GitLab.\n\n```go\nfunc FetchCurrentToken(baseURL string, pat string) (*SelfToken, error)\n```\nFetchCurrentToken retrieves the current personal access token details from GitLab.\n\n","path":"github.com/CompassSecurity/pipeleek/pkg/gitlab/util","name":"util","synopsis":"","isRedistributable":true}
