Documentation ¶
Index ¶
- type GitlabClient
- type Group
- type GroupList
- type Message
- type PaginationOptions
- type Pipeline
- type Pipelines
- type Project
- type ProjectInfo
- type ProjectList
- type ProjectMirror
- type ProjectMirrors
- type ProtectedBranchSettings
- type RepositoryFile
- type RequestError
- type ResponseMeta
- type ResponseWithMessage
- type SortDirection
- type SortOptions
- type Variable
- type Variables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitlabClient ¶ added in v0.1.2
type GitlabClient interface { GetProperty(property string) string SetProperty(property string, value string) string Get(uri string) (string, error) Delete(uri string) (string, error) GetUsers(search string) (string, error) GetGroup(groupID int) (Group, error) GetGroups(search string) (GroupList, error) GetSubGroups(groupID int) (GroupList, error) GetDescendantGroups(groupID int) (GroupList, error) GetGroupProjects(groupID int) (ProjectList, error) GetGroupMembers(group int) (string, error) AddGroupMember(groupID, userID, accessLevel int) (string, error) GetForcePushSetting(projectID int, protectedBranch string) (bool, error) GetProjectID(projectPath string) (int, error) GetProject(projectID int) (Project, error) GetProjectMembers(project int) (string, error) AddProjectMember(projectID, userID, accessLevel int) (string, error) DeleteProject(projectID int) error GetProjectMirrors(projectID int) (ProjectMirrors, error) GetGroupID(groupPath string) (int, error) CreateProject(groupID int, projectPath string, visibility string) (Project, error) DeleteProtectedBranch(projectID int, protectedBranch string) (bool, error) ProtectBranch(projectID int, protectedBranch string) (bool, error) CreateProjectMirror(projectID int, mirrorURL string) (ProjectMirror, error) UpdateProjectMirror(projectID int, mirrorID int) (ProjectMirror, error) CreateMergeRequest(projectID int, title string, sourceBranch string, targetBranch string, description string, squashOnMerge bool, removeSourceBranch bool) (string, error) GetPipelines(projectID int, user string, limit int) (Pipelines, error) GetPipeline(projectID int, pipelineID int) (Pipeline, error) GetVariableFrom(id int, resource string, variable string) (string, error) GetCicdVariables(projectdID int) (Variables, error) GetCicdVariablesFromGroup(groupID int, includeProjects bool) (Variables, error) UpdateVariableFrom(id int, resource string, variable string, value string) (string, error) GetRepositoryFile(projectSlug string, fileSlug string, ref string) ([]byte, error) }
func NewGitlabMock ¶ added in v0.1.2
func NewGitlabMock(baseUrl, apiPath, token string) GitlabClient
NewGitlabMock - Mocking the gitlab interactions
type Group ¶ added in v0.1.6
type Group struct { ID int `json:"id"` WebURL string `json:"web_url"` Name string `json:"name"` Path string `json:"path"` Description string `json:"description"` Visibility string `json:"visibility"` RequireTwoFactorAuthentication bool `json:"require_two_factor_authentication"` TwoFactorGracePeriod int `json:"two_factor_grace_period"` ProjectCreationLevel string `json:"project_creation_level"` AutoDevopsEnabled interface{} `json:"auto_devops_enabled"` SubgroupCreationLevel string `json:"subgroup_creation_level"` EmailsDisabled interface{} `json:"emails_disabled"` MentionsDisabled interface{} `json:"mentions_disabled"` LfsEnabled bool `json:"lfs_enabled"` DefaultBranchProtection int `json:"default_branch_protection"` AvatarURL interface{} `json:"avatar_url"` RequestAccessEnabled bool `json:"request_access_enabled"` FullName string `json:"full_name"` FullPath string `json:"full_path"` CreatedAt time.Time `json:"created_at"` ParentID int `json:"parent_id"` LdapCn interface{} `json:"ldap_cn"` LdapAccess interface{} `json:"ldap_access"` MarkedForDeletionOn interface{} `json:"marked_for_deletion_on"` }
type GroupList ¶ added in v0.1.6
type GroupList []Group
type PaginationOptions ¶
type Pipelines ¶ added in v0.1.9
type Pipelines []Pipeline
type Project ¶ added in v0.1.2
type Project struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` NameWithNamespace string `json:"name_with_namespace"` Path string `json:"path"` PathWithNamespace string `json:"path_with_namespace"` Archived bool `json:"archived"` SSHURL string `json:"ssh_url_to_repo"` HTTPURL string `json:"http_url_to_repo"` CreatedAt time.Time `json:"created_at"` DefaultBranch string `json:"default_branch"` Namespace struct { ID int `json:"id"` Name string `json:"name"` Path string `json:"path"` Kind string `json:"kind"` FullPath string `json:"full_path"` ParentID int `json:"parent_id"` WebURL string `json:"web_url"` } `json:"namespace"` Visibility string `json:"visibility"` CreatorID int `json:"creator_id"` Mirror bool `json:"mirror"` }
type ProjectInfo ¶
type ProjectInfo struct {
ID int `json:"id"`
}
type ProjectList ¶ added in v0.1.7
type ProjectList []Project
type ProjectMirror ¶ added in v0.1.2
type ProjectMirror struct { ID int `json:"id"` Enabled bool `json:"enabled"` URL string `json:"url"` UpdateStatus string `json:"update_status"` LastUpdateAt time.Time `json:"last_update_at"` LastUpdateStartedAt time.Time `json:"last_update_started_at"` LastSuccessfulUpdateAt time.Time `json:"last_successful_update_at"` LastError interface{} `json:"last_error"` OnlyProtectedBranches bool `json:"only_protected_branches"` KeepDivergentRefs interface{} `json:"keep_divergent_refs"` }
type ProjectMirrors ¶ added in v0.1.2
type ProjectMirrors []ProjectMirror
type ProtectedBranchSettings ¶ added in v0.1.2
type ProtectedBranchSettings struct { ID int `json:"id"` Name string `json:"name"` PushAccessLevels []struct { AccessLevel int `json:"access_level"` AccessLevelDescription string `json:"access_level_description"` UserID interface{} `json:"user_id"` GroupID interface{} `json:"group_id"` } `json:"push_access_levels"` MergeAccessLevels []struct { AccessLevel int `json:"access_level"` AccessLevelDescription string `json:"access_level_description"` UserID interface{} `json:"user_id"` GroupID interface{} `json:"group_id"` } `json:"merge_access_levels"` AllowForcePush bool `json:"allow_force_push"` UnprotectAccessLevels []struct { AccessLevel int `json:"access_level"` AccessLevelDescription string `json:"access_level_description"` UserID interface{} `json:"user_id"` GroupID interface{} `json:"group_id"` } `json:"unprotect_access_levels"` CodeOwnerApprovalRequired bool `json:"code_owner_approval_required"` }
type RepositoryFile ¶ added in v0.1.20
type RepositoryFile struct { FileName string `json:"file_name"` FilePath string `json:"file_path"` Size int `json:"size"` Encoding string `json:"encoding"` ContentSha256 string `json:"content_sha256"` Ref string `json:"ref"` BlobID string `json:"blob_id"` CommitID string `json:"commit_id"` LastCommitID string `json:"last_commit_id"` ExecuteFilemode bool `json:"execute_filemode"` Content string `json:"content"` }
type RequestError ¶ added in v0.1.2
func (*RequestError) Error ¶ added in v0.1.2
func (r *RequestError) Error() string
type ResponseMeta ¶
type ResponseWithMessage ¶
type ResponseWithMessage struct {
Message string `json:"message"`
}
type SortDirection ¶
type SortDirection string
const ( SortDirectionAsc SortDirection = "asc" SortDirectionDesc SortDirection = "desc" )
type SortOptions ¶
type SortOptions struct { OrderBy string `url:"order_by,omitempty"` Sort SortDirection `url:"sort,omitempty"` }
Click to show internal directories.
Click to hide internal directories.