gitlab

package module
v0.39.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

README

go-gitlab

A GitLab API client enabling Go programs to interact with GitLab in a simple and uniform way

Build Status GitHub license Sourcegraph GoDoc Go Report Card GitHub issues

NOTE

Release v0.6.0 (released on 25-08-2017) no longer supports the older V3 Gitlab API. If you need V3 support, please use the f-api-v3 branch. This release contains some backwards incompatible changes that were needed to fully support the V4 Gitlab API.

Coverage

This API client package covers most of the existing Gitlab API calls and is updated regularly to add new and/or missing endpoints. Currently the following services are supported:

  • Applications
  • Award Emojis
  • Branches
  • Broadcast Messages
  • Commits
  • Container Registry
  • Custom Attributes
  • Deploy Keys
  • Deployments
  • Discussions (threaded comments)
  • Environments
  • Epic Issues
  • Epics
  • Events
  • Feature Flags
  • Geo Nodes
  • GitLab CI Config Templates
  • Gitignores Templates
  • Group Access Requests
  • Group Issue Boards
  • Group Members
  • Group Milestones
  • Group-Level Variables
  • Groups
  • Instance Clusters
  • Issue Boards
  • Issues
  • Jobs
  • Keys
  • Labels
  • License
  • Merge Request Approvals
  • Merge Requests
  • Namespaces
  • Notes (comments)
  • Notification Settings
  • Open Source License Templates
  • Pages Domains
  • Pipeline Schedules
  • Pipeline Triggers
  • Pipelines
  • Project Access Requests
  • Project Badges
  • Project Clusters
  • Project Import/export
  • Project Members
  • Project Milestones
  • Project Snippets
  • Project-Level Variables
  • Projects (including setting Webhooks)
  • Protected Branches
  • Protected Tags
  • Repositories
  • Repository Files
  • Runners
  • Search
  • Services
  • Settings
  • Sidekiq Metrics
  • System Hooks
  • Tags
  • Todos
  • Users
  • Validate CI Configuration
  • Version
  • Wikis

Usage

import "github.com/xanzy/go-gitlab"

Construct a new GitLab client, then use the various services on the client to access different parts of the GitLab API. For example, to list all users:

git, err := gitlab.NewClient("yourtokengoeshere")
if err != nil {
  log.Fatalf("Failed to create client: %v", err)
}
users, _, err := git.Users.ListUsers(&gitlab.ListUsersOptions{})

There are a few With... option functions that can be used to customize the API client. For example, to set a custom base URL:

git, err := gitlab.NewClient("yourtokengoeshere", gitlab.WithBaseURL("https://git.mydomain.com/api/v4"))
if err != nil {
  log.Fatalf("Failed to create client: %v", err)
}
users, _, err := git.Users.ListUsers(&gitlab.ListUsersOptions{})

Some API methods have optional parameters that can be passed. For example, to list all projects for user "svanharmelen":

git := gitlab.NewClient("yourtokengoeshere")
opt := &ListProjectsOptions{Search: gitlab.String("svanharmelen")}
projects, _, err := git.Projects.ListProjects(opt)
Examples

The examples directory contains a couple for clear examples, of which one is partially listed here as well:

package main

import (
	"log"

	"github.com/xanzy/go-gitlab"
)

func main() {
	git, err := gitlab.NewClient("yourtokengoeshere")
	if err != nil {
		log.Fatalf("Failed to create client: %v", err)
	}

	// Create new project
	p := &gitlab.CreateProjectOptions{
		Name:                 gitlab.String("My Project"),
		Description:          gitlab.String("Just a test project to play with"),
		MergeRequestsEnabled: gitlab.Bool(true),
		SnippetsEnabled:      gitlab.Bool(true),
		Visibility:           gitlab.Visibility(gitlab.PublicVisibility),
	}
	project, _, err := git.Projects.CreateProject(p)
	if err != nil {
		log.Fatal(err)
	}

	// Add a new snippet
	s := &gitlab.CreateProjectSnippetOptions{
		Title:           gitlab.String("Dummy Snippet"),
		FileName:        gitlab.String("snippet.go"),
		Content:         gitlab.String("package main...."),
		Visibility:      gitlab.Visibility(gitlab.PublicVisibility),
	}
	_, _, err = git.ProjectSnippets.CreateSnippet(project.ID, s)
	if err != nil {
		log.Fatal(err)
	}
}

For complete usage of go-gitlab, see the full package docs.

ToDo

  • The biggest thing this package still needs is tests 😞

Issues

Author

Sander van Harmelen (sander@vanharmelen.nl)

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Documentation

Overview

Package gitlab implements a GitLab API client.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserActivatePrevented   = errors.New("Cannot activate a user that is blocked by admin or by LDAP synchronization")
	ErrUserBlockPrevented      = errors.New("Cannot block a user that is already blocked by LDAP synchronization")
	ErrUserDeactivatePrevented = errors.New("Cannot deactivate a user that is blocked by admin or by LDAP synchronization, or that has any activity in past 180 days")
	ErrUserNotFound            = errors.New("User does not exist")
	ErrUserUnblockPrevented    = errors.New("Cannot unblock a user that is blocked by LDAP synchronization")
)

List a couple of standard errors.

Functions

func Bool

func Bool(v bool) *bool

Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.

func CheckResponse

func CheckResponse(r *http.Response) error

CheckResponse checks the API response for errors, and returns them if present.

func Int

func Int(v int) *int

Int is a helper routine that allocates a new int32 value to store v and returns a pointer to it, but unlike Int32 its argument value is an int.

func ParseHook added in v0.39.1

func ParseHook(eventType EventType, payload []byte) (event interface{}, err error)

ParseHook tries to parse both web- and system hooks.

Example usage:

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
    payload, err := ioutil.ReadAll(r.Body)
    if err != nil { ... }
    event, err := gitlab.ParseHook(gitlab.HookEventType(r), payload)
    if err != nil { ... }
    switch event := event.(type) {
    case *gitlab.PushEvent:
        processPushEvent(event)
    case *gitlab.MergeEvent:
        processMergeEvent(event)
    ...
    }
}

func ParseSystemhook added in v0.39.1

func ParseSystemhook(payload []byte) (event interface{}, err error)

ParseSystemhook parses the event payload. For recognized event types, a value of the corresponding struct type will be returned. An error will be returned for unrecognized event types.

Example usage:

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
    payload, err := ioutil.ReadAll(r.Body)
    if err != nil { ... }
    event, err := gitlab.ParseSystemhook(payload)
    if err != nil { ... }
    switch event := event.(type) {
    case *gitlab.PushSystemEvent:
        processPushSystemEvent(event)
    case *gitlab.MergeSystemEvent:
        processMergeSystemEvent(event)
    ...
    }
}

func ParseWebhook added in v0.39.1

func ParseWebhook(eventType EventType, payload []byte) (event interface{}, err error)

ParseWebhook parses the event payload. For recognized event types, a value of the corresponding struct type will be returned. An error will be returned for unrecognized event types.

Example usage:

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
    payload, err := ioutil.ReadAll(r.Body)
    if err != nil { ... }
    event, err := gitlab.ParseWebhook(gitlab.HookEventType(r), payload)
    if err != nil { ... }
    switch event := event.(type) {
    case *gitlab.PushEvent:
        processPushEvent(event)
    case *gitlab.MergeEvent:
        processMergeEvent(event)
    ...
    }
}

func String

func String(v string) *string

String is a helper routine that allocates a new string value to store v and returns a pointer to it.

func Stringify

func Stringify(message interface{}) string

Stringify attempts to create a reasonable string representation of types in the GitHub library. It does things like resolve pointers to their values and omits struct fields with nil values.

func Time added in v0.39.1

func Time(v time.Time) *time.Time

Time is a helper routine that allocates a new time.Time value to store v and returns a pointer to it.

Types

type AcceptMergeRequestOptions added in v0.4.0

type AcceptMergeRequestOptions struct {
	MergeCommitMessage        *string `url:"merge_commit_message,omitempty" json:"merge_commit_message,omitempty"`
	SquashCommitMessage       *string `url:"squash_commit_message,omitempty" json:"squash_commit_message,omitempty"`
	Squash                    *bool   `url:"squash,omitempty" json:"squash,omitempty"`
	ShouldRemoveSourceBranch  *bool   `url:"should_remove_source_branch,omitempty" json:"should_remove_source_branch,omitempty"`
	MergeWhenPipelineSucceeds *bool   `url:"merge_when_pipeline_succeeds,omitempty" json:"merge_when_pipeline_succeeds,omitempty"`
	SHA                       *string `url:"sha,omitempty" json:"sha,omitempty"`
}

AcceptMergeRequestOptions represents the available AcceptMergeRequest() options.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#accept-mr

type AccessControlValue added in v0.39.1

type AccessControlValue string

AccessControlValue represents an access control value within GitLab, used for managing access to certain project features.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html

const (
	DisabledAccessControl AccessControlValue = "disabled"
	EnabledAccessControl  AccessControlValue = "enabled"
	PrivateAccessControl  AccessControlValue = "private"
	PublicAccessControl   AccessControlValue = "public"
)

List of available access control values.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html

func AccessControl added in v0.39.1

func AccessControl(v AccessControlValue) *AccessControlValue

AccessControl is a helper routine that allocates a new AccessControlValue to store v and returns a pointer to it.

type AccessLevelValue added in v0.2.0

type AccessLevelValue int

AccessLevelValue represents a permission level within GitLab.

GitLab API docs: https://docs.gitlab.com/ce/permissions/permissions.html

const (
	NoPermissions            AccessLevelValue = 0
	MinimalAccessPermissions AccessLevelValue = 5
	GuestPermissions         AccessLevelValue = 10
	ReporterPermissions      AccessLevelValue = 20
	DeveloperPermissions     AccessLevelValue = 30
	MaintainerPermissions    AccessLevelValue = 40
	OwnerPermissions         AccessLevelValue = 50

	// These are deprecated and should be removed in a future version
	MasterPermissions AccessLevelValue = 40
	OwnerPermission   AccessLevelValue = 50
)

List of available access levels

GitLab API docs: https://docs.gitlab.com/ce/permissions/permissions.html

func AccessLevel

func AccessLevel(v AccessLevelValue) *AccessLevelValue

AccessLevel is a helper routine that allocates a new AccessLevelValue to store v and returns a pointer to it.

type AccessRequest added in v0.11.1

type AccessRequest struct {
	ID          int              `json:"id"`
	Username    string           `json:"username"`
	Name        string           `json:"name"`
	State       string           `json:"state"`
	CreatedAt   *time.Time       `json:"created_at"`
	RequestedAt *time.Time       `json:"requested_at"`
	AccessLevel AccessLevelValue `json:"access_level"`
}

AccessRequest represents a access request for a group or project.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html

type AccessRequestsService added in v0.11.1

type AccessRequestsService struct {
	// contains filtered or unexported fields
}

AccessRequestsService handles communication with the project/group access requests related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html

func (*AccessRequestsService) ApproveGroupAccessRequest added in v0.11.1

func (s *AccessRequestsService) ApproveGroupAccessRequest(gid interface{}, user int, opt *ApproveAccessRequestOptions, options ...RequestOptionFunc) (*AccessRequest, *Response, error)

ApproveGroupAccessRequest approves an access request for the given user.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html#approve-an-access-request

func (*AccessRequestsService) ApproveProjectAccessRequest added in v0.11.1

func (s *AccessRequestsService) ApproveProjectAccessRequest(pid interface{}, user int, opt *ApproveAccessRequestOptions, options ...RequestOptionFunc) (*AccessRequest, *Response, error)

ApproveProjectAccessRequest approves an access request for the given user.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html#approve-an-access-request

func (*AccessRequestsService) DenyGroupAccessRequest added in v0.11.1

func (s *AccessRequestsService) DenyGroupAccessRequest(gid interface{}, user int, options ...RequestOptionFunc) (*Response, error)

DenyGroupAccessRequest denies an access request for the given user.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html#deny-an-access-request

func (*AccessRequestsService) DenyProjectAccessRequest added in v0.11.1

func (s *AccessRequestsService) DenyProjectAccessRequest(pid interface{}, user int, options ...RequestOptionFunc) (*Response, error)

DenyProjectAccessRequest denies an access request for the given user.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html#deny-an-access-request

func (*AccessRequestsService) ListGroupAccessRequests added in v0.11.1

func (s *AccessRequestsService) ListGroupAccessRequests(gid interface{}, opt *ListAccessRequestsOptions, options ...RequestOptionFunc) ([]*AccessRequest, *Response, error)

ListGroupAccessRequests gets a list of access requests viewable by the authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html#list-access-requests-for-a-group-or-project

func (*AccessRequestsService) ListProjectAccessRequests added in v0.11.1

func (s *AccessRequestsService) ListProjectAccessRequests(pid interface{}, opt *ListAccessRequestsOptions, options ...RequestOptionFunc) ([]*AccessRequest, *Response, error)

ListProjectAccessRequests gets a list of access requests viewable by the authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html#list-access-requests-for-a-group-or-project

func (*AccessRequestsService) RequestGroupAccess added in v0.11.1

func (s *AccessRequestsService) RequestGroupAccess(gid interface{}, options ...RequestOptionFunc) (*AccessRequest, *Response, error)

RequestGroupAccess requests access for the authenticated user to a group or project.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html#request-access-to-a-group-or-project

func (*AccessRequestsService) RequestProjectAccess added in v0.11.1

func (s *AccessRequestsService) RequestProjectAccess(pid interface{}, options ...RequestOptionFunc) (*AccessRequest, *Response, error)

RequestProjectAccess requests access for the authenticated user to a group or project.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html#request-access-to-a-group-or-project

type AddClusterOptions added in v0.39.1

type AddClusterOptions struct {
	Name                *string                       `url:"name,omitempty" json:"name,omitempty"`
	Domain              *string                       `url:"domain,omitempty" json:"domain,omitempty"`
	Enabled             *bool                         `url:"enabled,omitempty" json:"enabled,omitempty"`
	Managed             *bool                         `url:"managed,omitempty" json:"managed,omitempty"`
	EnvironmentScope    *string                       `url:"environment_scope,omitempty" json:"environment_scope,omitempty"`
	PlatformKubernetes  *AddPlatformKubernetesOptions `url:"platform_kubernetes_attributes,omitempty" json:"platform_kubernetes_attributes,omitempty"`
	ManagementProjectID *string                       `url:"management_project_id,omitempty" json:"management_project_id,omitempty"`
}

AddClusterOptions represents the available AddCluster() options.

GitLab API docs: https://docs.gitlab.com/ee/api/project_clusters.html#add-existing-cluster-to-project

type AddCommitDiscussionNoteOptions added in v0.11.2

type AddCommitDiscussionNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

AddCommitDiscussionNoteOptions represents the available AddCommitDiscussionNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-commit-thread

type AddDeployKeyOptions

type AddDeployKeyOptions struct {
	Title   *string `url:"title,omitempty" json:"title,omitempty"`
	Key     *string `url:"key,omitempty" json:"key,omitempty"`
	CanPush *bool   `url:"can_push,omitempty" json:"can_push,omitempty"`
}

AddDeployKeyOptions represents the available ADDDeployKey() options.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html#add-deploy-key

type AddEmailOptions added in v0.4.0

type AddEmailOptions struct {
	Email *string `url:"email,omitempty" json:"email,omitempty"`
}

AddEmailOptions represents the available AddEmail() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#add-email

type AddEpicDiscussionNoteOptions added in v0.11.2

type AddEpicDiscussionNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

AddEpicDiscussionNoteOptions represents the available AddEpicDiscussionNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-epic-thread

type AddGroupBadgeOptions added in v0.39.1

type AddGroupBadgeOptions struct {
	LinkURL  *string `url:"link_url,omitempty" json:"link_url,omitempty"`
	ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"`
}

AddGroupBadgeOptions represents the available AddGroupBadge() options.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html#add-a-badge-to-a-group

type AddGroupClusterOptions added in v0.39.1

type AddGroupClusterOptions struct {
	Name                *string                            `url:"name,omitempty" json:"name,omitempty"`
	Domain              *string                            `url:"domain,omitempty" json:"domain,omitempty"`
	ManagementProjectID *string                            `url:"management_project_id,omitempty" json:"management_project_id,omitempty"`
	Enabled             *bool                              `url:"enabled,omitempty" json:"enabled,omitempty"`
	Managed             *bool                              `url:"managed,omitempty" json:"managed,omitempty"`
	EnvironmentScope    *string                            `url:"environment_scope,omitempty" json:"environment_scope,omitempty"`
	PlatformKubernetes  *AddGroupPlatformKubernetesOptions `url:"platform_kubernetes_attributes,omitempty" json:"platform_kubernetes_attributes,omitempty"`
}

AddGroupClusterOptions represents the available AddCluster() options.

GitLab API docs: https://docs.gitlab.com/ee/api/group_clusters.html#add-existing-cluster-to-group

type AddGroupHookOptions added in v0.39.1

type AddGroupHookOptions struct {
	URL                      *string `url:"url,omitempty" json:"url,omitempty"`
	PushEvents               *bool   `url:"push_events,omitempty"  json:"push_events,omitempty"`
	IssuesEvents             *bool   `url:"issues_events,omitempty"  json:"issues_events,omitempty"`
	ConfidentialIssuesEvents *bool   `url:"confidential_issues_events,omitempty"  json:"confidential_issues_events,omitempty"`
	ConfidentialNoteEvents   *bool   `url:"confidential_note_events,omitempty"  json:"confidential_note_events,omitempty"`
	MergeRequestsEvents      *bool   `url:"merge_requests_events,omitempty"  json:"merge_requests_events,omitempty"`
	TagPushEvents            *bool   `url:"tag_push_events,omitempty"  json:"tag_push_events,omitempty"`
	NoteEvents               *bool   `url:"note_events,omitempty"  json:"note_events,omitempty"`
	JobEvents                *bool   `url:"job_events,omitempty"  json:"job_events,omitempty"`
	PipelineEvents           *bool   `url:"pipeline_events,omitempty"  json:"pipeline_events,omitempty"`
	WikiPageEvents           *bool   `url:"wiki_page_events,omitempty"  json:"wiki_page_events,omitempty"`
	EnableSSLVerification    *bool   `url:"enable_ssl_verification,omitempty"  json:"enable_ssl_verification,omitempty"`
	Token                    *string `url:"token,omitempty" json:"token,omitempty"`
}

AddGroupHookOptions represents the available AddGroupHook() options.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#add-group-hook

type AddGroupLDAPLinkOptions added in v0.39.1

type AddGroupLDAPLinkOptions struct {
	CN          *string `url:"cn,omitempty" json:"cn,omitempty"`
	GroupAccess *int    `url:"group_access,omitempty" json:"group_access,omitempty"`
	Provider    *string `url:"provider,omitempty" json:"provider,omitempty"`
}

AddGroupLDAPLinkOptions represents the available AddGroupLDAPLink() options.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#add-ldap-group-link-starter

type AddGroupMemberOptions

type AddGroupMemberOptions struct {
	UserID      *int              `url:"user_id,omitempty" json:"user_id,omitempty"`
	AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
	ExpiresAt   *string           `url:"expires_at,omitempty" json:"expires_at"`
}

AddGroupMemberOptions represents the available AddGroupMember() options.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#add-a-member-to-a-group-or-project

type AddGroupPlatformKubernetesOptions added in v0.39.1

type AddGroupPlatformKubernetesOptions struct {
	APIURL            *string `url:"api_url,omitempty" json:"api_url,omitempty"`
	Token             *string `url:"token,omitempty" json:"token,omitempty"`
	CaCert            *string `url:"ca_cert,omitempty" json:"ca_cert,omitempty"`
	Namespace         *string `url:"namespace,omitempty" json:"namespace,omitempty"`
	AuthorizationType *string `url:"authorization_type,omitempty" json:"authorization_type,omitempty"`
}

AddGroupPlatformKubernetesOptions represents the available PlatformKubernetes options for adding.

type AddGroupPushRuleOptions added in v0.39.1

type AddGroupPushRuleOptions struct {
	DenyDeleteTag              *bool   `url:"deny_delete_tag,omitempty" json:"deny_delete_tag,omitempty"`
	MemberCheck                *bool   `url:"member_check,omitempty" json:"member_check,omitempty"`
	PreventSecrets             *bool   `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"`
	CommitMessageRegex         *string `url:"commit_message_regex,omitempty" json:"commit_message_regex,omitempty"`
	CommitMessageNegativeRegex *string `url:"commit_message_negative_regex,omitempty" json:"commit_message_negative_regex,omitempty"`
	BranchNameRegex            *string `url:"branch_name_regex,omitempty" json:"branch_name_regex,omitempty"`
	AuthorEmailRegex           *string `url:"author_email_regex,omitempty" json:"author_email_regex,omitempty"`
	FileNameRegex              *string `url:"file_name_regex,omitempty" json:"file_name_regex,omitempty"`
	MaxFileSize                *int    `url:"max_file_size,omitempty" json:"max_file_size,omitempty"`
	CommitCommitterCheck       *bool   `url:"commit_committer_check,omitempty" json:"commit_committer_check,omitempty"`
	RejectUnsignedCommits      *bool   `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"`
}

AddGroupPushRuleOptions represents the available AddGroupPushRule() options.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#add-group-push-rule

type AddHookOptions

type AddHookOptions struct {
	URL                    *string `url:"url,omitempty" json:"url,omitempty"`
	Token                  *string `url:"token,omitempty" json:"token,omitempty"`
	PushEvents             *bool   `url:"push_events,omitempty" json:"push_events,omitempty"`
	TagPushEvents          *bool   `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
	MergeRequestsEvents    *bool   `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
	RepositoryUpdateEvents *bool   `url:"repository_update_events,omitempty" json:"repository_update_events,omitempty"`
	EnableSSLVerification  *bool   `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
}

AddHookOptions represents the available AddHook() options.

GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook

type AddIssueDiscussionNoteOptions added in v0.11.2

type AddIssueDiscussionNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

AddIssueDiscussionNoteOptions represents the available AddIssueDiscussionNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-issue-thread

type AddLicenseOptions added in v0.11.4

type AddLicenseOptions struct {
	License *string `url:"license" json:"license"`
}

AddLicenseOptions represents the available AddLicense() options.

https://docs.gitlab.com/ee/api/license.html#add-a-new-license

type AddMergeRequestDiscussionNoteOptions added in v0.11.2

type AddMergeRequestDiscussionNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

AddMergeRequestDiscussionNoteOptions represents the available AddMergeRequestDiscussionNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-merge-request-discussion

type AddPipelineTriggerOptions added in v0.6.0

type AddPipelineTriggerOptions struct {
	Description *string `url:"description,omitempty" json:"description,omitempty"`
}

AddPipelineTriggerOptions represents the available AddPipelineTrigger() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#create-a-project-trigger

type AddPlatformKubernetesOptions added in v0.39.1

type AddPlatformKubernetesOptions struct {
	APIURL            *string `url:"api_url,omitempty" json:"api_url,omitempty"`
	Token             *string `url:"token,omitempty" json:"token,omitempty"`
	CaCert            *string `url:"ca_cert,omitempty" json:"ca_cert,omitempty"`
	Namespace         *string `url:"namespace,omitempty" json:"namespace,omitempty"`
	AuthorizationType *string `url:"authorization_type,omitempty" json:"authorization_type,omitempty"`
}

AddPlatformKubernetesOptions represents the available PlatformKubernetes options for adding.

type AddProjectBadgeOptions added in v0.11.1

type AddProjectBadgeOptions struct {
	LinkURL  *string `url:"link_url,omitempty" json:"link_url,omitempty"`
	ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"`
}

AddProjectBadgeOptions represents the available AddProjectBadge() options.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#add-a-badge-to-a-project

type AddProjectHookOptions

type AddProjectHookOptions struct {
	URL                      *string `url:"url,omitempty" json:"url,omitempty"`
	ConfidentialNoteEvents   *bool   `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"`
	PushEvents               *bool   `url:"push_events,omitempty" json:"push_events,omitempty"`
	PushEventsBranchFilter   *string `url:"push_events_branch_filter,omitempty" json:"push_events_branch_filter,omitempty"`
	IssuesEvents             *bool   `url:"issues_events,omitempty" json:"issues_events,omitempty"`
	ConfidentialIssuesEvents *bool   `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"`
	MergeRequestsEvents      *bool   `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
	TagPushEvents            *bool   `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
	NoteEvents               *bool   `url:"note_events,omitempty" json:"note_events,omitempty"`
	JobEvents                *bool   `url:"job_events,omitempty" json:"job_events,omitempty"`
	PipelineEvents           *bool   `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"`
	WikiPageEvents           *bool   `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
	EnableSSLVerification    *bool   `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
	Token                    *string `url:"token,omitempty" json:"token,omitempty"`
}

AddProjectHookOptions represents the available AddProjectHook() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#add-project-hook

type AddProjectMemberOptions

type AddProjectMemberOptions struct {
	UserID      *int              `url:"user_id,omitempty" json:"user_id,omitempty"`
	AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
	ExpiresAt   *string           `url:"expires_at,omitempty" json:"expires_at"`
}

AddProjectMemberOptions represents the available AddProjectMember() options.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#add-a-member-to-a-group-or-project

type AddProjectMirrorOptions added in v0.39.1

type AddProjectMirrorOptions struct {
	URL                   *string `url:"url,omitempty" json:"url,omitempty"`
	Enabled               *bool   `url:"enabled,omitempty" json:"enabled,omitempty"`
	OnlyProtectedBranches *bool   `url:"only_protected_branches,omitempty" json:"only_protected_branches,omitempty"`
	KeepDivergentRefs     *bool   `url:"keep_divergent_refs,omitempty" json:"keep_divergent_refs,omitempty"`
}

AddProjectMirrorOptions contains the properties requires to create a new project mirror.

GitLab API docs: https://docs.gitlab.com/ce/api/remote_mirrors.html#create-a-remote-mirror

type AddProjectPushRuleOptions added in v0.39.1

type AddProjectPushRuleOptions struct {
	DenyDeleteTag              *bool   `url:"deny_delete_tag,omitempty" json:"deny_delete_tag,omitempty"`
	MemberCheck                *bool   `url:"member_check,omitempty" json:"member_check,omitempty"`
	PreventSecrets             *bool   `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"`
	CommitMessageRegex         *string `url:"commit_message_regex,omitempty" json:"commit_message_regex,omitempty"`
	CommitMessageNegativeRegex *string `url:"commit_message_negative_regex,omitempty" json:"commit_message_negative_regex,omitempty"`
	BranchNameRegex            *string `url:"branch_name_regex,omitempty" json:"branch_name_regex,omitempty"`
	AuthorEmailRegex           *string `url:"author_email_regex,omitempty" json:"author_email_regex,omitempty"`
	FileNameRegex              *string `url:"file_name_regex,omitempty" json:"file_name_regex,omitempty"`
	MaxFileSize                *int    `url:"max_file_size,omitempty" json:"max_file_size,omitempty"`
	CommitCommitterCheck       *bool   `url:"commit_committer_check,omitempty" json:"commit_committer_check,omitempty"`
	RejectUnsignedCommits      *bool   `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"`
}

AddProjectPushRuleOptions represents the available AddProjectPushRule() options.

GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#add-project-push-rule

type AddSSHKeyOptions

type AddSSHKeyOptions struct {
	Title *string `url:"title,omitempty" json:"title,omitempty"`
	Key   *string `url:"key,omitempty" json:"key,omitempty"`
}

AddSSHKeyOptions represents the available AddSSHKey() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#add-ssh-key

type AddSnippetDiscussionNoteOptions added in v0.11.2

type AddSnippetDiscussionNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

AddSnippetDiscussionNoteOptions represents the available AddSnippetDiscussionNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-snippet-thread

type AddSpentTimeOptions added in v0.4.0

type AddSpentTimeOptions struct {
	Duration *string `url:"duration,omitempty" json:"duration,omitempty"`
}

AddSpentTimeOptions represents the available AddSpentTime() options.

GitLab docs: https://docs.gitlab.com/ce/workflow/time_tracking.html

type Application added in v0.39.1

type Application struct {
	ID              int    `json:"id"`
	ApplicationID   string `json:"application_id"`
	ApplicationName string `json:"application_name"`
	Secret          string `json:"secret"`
	CallbackURL     string `json:"callback_url"`
	Confidential    bool   `json:"confidential"`
}

type ApplicationsService added in v0.39.1

type ApplicationsService struct {
	// contains filtered or unexported fields
}

ApplicationsService handles communication with administrables applications of the Gitlab API.

Gitlab API docs : https://docs.gitlab.com/ee/api/applications.html

func (*ApplicationsService) CreateApplication added in v0.39.1

func (s *ApplicationsService) CreateApplication(opt *CreateApplicationOptions, options ...RequestOptionFunc) (*Application, *Response, error)

CreateApplication creates a new application owned by the authenticated user.

Gitlab API docs : https://docs.gitlab.com/ce/api/applications.html#create-an-application

func (*ApplicationsService) DeleteApplication added in v0.39.1

func (s *ApplicationsService) DeleteApplication(application int, options ...RequestOptionFunc) (*Response, error)

DeleteApplication removes a specific application.

GitLab API docs: https://docs.gitlab.com/ce/api/applications.html#delete-an-application

func (*ApplicationsService) ListApplications added in v0.39.1

func (s *ApplicationsService) ListApplications(opt *ListApplicationsOptions, options ...RequestOptionFunc) ([]*Application, *Response, error)

ListApplications get a list of administrables applications by the authenticated user

Gitlab API docs : https://docs.gitlab.com/ce/api/applications.html#list-all-applications

type ApproveAccessRequestOptions added in v0.11.1

type ApproveAccessRequestOptions struct {
	AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
}

ApproveAccessRequestOptions represents the available ApproveProjectAccessRequest() and ApproveGroupAccessRequest() options.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html#approve-an-access-request

type ApproveMergeRequestOptions added in v0.10.0

type ApproveMergeRequestOptions struct {
	SHA *string `url:"sha,omitempty" json:"sha,omitempty"`
}

ApproveMergeRequestOptions represents the available ApproveMergeRequest() options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#approve-merge-request

type ArchiveOptions

type ArchiveOptions struct {
	Format *string `url:"-" json:"-"`
	SHA    *string `url:"sha,omitempty" json:"sha,omitempty"`
}

ArchiveOptions represents the available Archive() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#get-file-archive

type Author

type Author struct {
	ID        int        `json:"id"`
	Username  string     `json:"username"`
	Email     string     `json:"email"`
	Name      string     `json:"name"`
	State     string     `json:"state"`
	Blocked   bool       `json:"blocked"`
	CreatedAt *time.Time `json:"created_at"`
}

Author represents a GitLab commit author

type AwardEmoji added in v0.8.0

type AwardEmoji struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	User struct {
		Name      string `json:"name"`
		Username  string `json:"username"`
		ID        int    `json:"id"`
		State     string `json:"state"`
		AvatarURL string `json:"avatar_url"`
		WebURL    string `json:"web_url"`
	} `json:"user"`
	CreatedAt     *time.Time `json:"created_at"`
	UpdatedAt     *time.Time `json:"updated_at"`
	AwardableID   int        `json:"awardable_id"`
	AwardableType string     `json:"awardable_type"`
}

AwardEmoji represents a GitLab Award Emoji.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html

type AwardEmojiService added in v0.8.0

type AwardEmojiService struct {
	// contains filtered or unexported fields
}

AwardEmojiService handles communication with the emoji awards related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html

func (*AwardEmojiService) CreateIssueAwardEmoji added in v0.8.0

func (s *AwardEmojiService) CreateIssueAwardEmoji(pid interface{}, issueIID int, opt *CreateAwardEmojiOptions, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

CreateIssueAwardEmoji get an award emoji from issue.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-a-new-emoji

func (*AwardEmojiService) CreateIssuesAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) CreateIssuesAwardEmojiOnNote(pid interface{}, issueID, noteID int, opt *CreateAwardEmojiOptions, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

CreateIssuesAwardEmojiOnNote gets an award emoji on a note from an issue.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) CreateMergeRequestAwardEmoji added in v0.8.0

func (s *AwardEmojiService) CreateMergeRequestAwardEmoji(pid interface{}, mergeRequestIID int, opt *CreateAwardEmojiOptions, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

CreateMergeRequestAwardEmoji get an award emoji from merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-a-new-emoji

func (*AwardEmojiService) CreateMergeRequestAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) CreateMergeRequestAwardEmojiOnNote(pid interface{}, mergeRequestIID, noteID int, opt *CreateAwardEmojiOptions, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

CreateMergeRequestAwardEmojiOnNote gets an award emoji on a note from a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) CreateSnippetAwardEmoji added in v0.8.0

func (s *AwardEmojiService) CreateSnippetAwardEmoji(pid interface{}, snippetID int, opt *CreateAwardEmojiOptions, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

CreateSnippetAwardEmoji get an award emoji from snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-a-new-emoji

func (*AwardEmojiService) CreateSnippetAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) CreateSnippetAwardEmojiOnNote(pid interface{}, snippetIID, noteID int, opt *CreateAwardEmojiOptions, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

CreateSnippetAwardEmojiOnNote gets an award emoji on a note from a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) DeleteIssueAwardEmoji added in v0.8.0

func (s *AwardEmojiService) DeleteIssueAwardEmoji(pid interface{}, issueIID, awardID int, options ...RequestOptionFunc) (*Response, error)

DeleteIssueAwardEmoji delete award emoji on an issue.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-a-new-emoji-on-a-note

func (*AwardEmojiService) DeleteIssuesAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) DeleteIssuesAwardEmojiOnNote(pid interface{}, issueID, noteID, awardID int, options ...RequestOptionFunc) (*Response, error)

DeleteIssuesAwardEmojiOnNote deletes an award emoji on a note from an issue.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) DeleteMergeRequestAwardEmoji added in v0.8.0

func (s *AwardEmojiService) DeleteMergeRequestAwardEmoji(pid interface{}, mergeRequestIID, awardID int, options ...RequestOptionFunc) (*Response, error)

DeleteMergeRequestAwardEmoji delete award emoji on a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-a-new-emoji-on-a-note

func (*AwardEmojiService) DeleteMergeRequestAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) DeleteMergeRequestAwardEmojiOnNote(pid interface{}, mergeRequestIID, noteID, awardID int, options ...RequestOptionFunc) (*Response, error)

DeleteMergeRequestAwardEmojiOnNote deletes an award emoji on a note from a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) DeleteSnippetAwardEmoji added in v0.8.0

func (s *AwardEmojiService) DeleteSnippetAwardEmoji(pid interface{}, snippetID, awardID int, options ...RequestOptionFunc) (*Response, error)

DeleteSnippetAwardEmoji delete award emoji on a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-a-new-emoji-on-a-note

func (*AwardEmojiService) DeleteSnippetAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) DeleteSnippetAwardEmojiOnNote(pid interface{}, snippetIID, noteID, awardID int, options ...RequestOptionFunc) (*Response, error)

DeleteSnippetAwardEmojiOnNote deletes an award emoji on a note from a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) GetIssueAwardEmoji added in v0.8.0

func (s *AwardEmojiService) GetIssueAwardEmoji(pid interface{}, issueIID, awardID int, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

GetIssueAwardEmoji get an award emoji from issue.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#list-an-awardable-39-s-award-emoji

func (*AwardEmojiService) GetIssuesAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) GetIssuesAwardEmojiOnNote(pid interface{}, issueID, noteID, awardID int, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

GetIssuesAwardEmojiOnNote gets an award emoji on a note from an issue.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) GetMergeRequestAwardEmoji added in v0.8.0

func (s *AwardEmojiService) GetMergeRequestAwardEmoji(pid interface{}, mergeRequestIID, awardID int, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

GetMergeRequestAwardEmoji get an award emoji from merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#list-an-awardable-39-s-award-emoji

func (*AwardEmojiService) GetMergeRequestAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) GetMergeRequestAwardEmojiOnNote(pid interface{}, mergeRequestIID, noteID, awardID int, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

GetMergeRequestAwardEmojiOnNote gets an award emoji on a note from a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) GetSnippetAwardEmoji added in v0.8.0

func (s *AwardEmojiService) GetSnippetAwardEmoji(pid interface{}, snippetID, awardID int, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

GetSnippetAwardEmoji get an award emoji from snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#list-an-awardable-39-s-award-emoji

func (*AwardEmojiService) GetSnippetAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) GetSnippetAwardEmojiOnNote(pid interface{}, snippetIID, noteID, awardID int, options ...RequestOptionFunc) (*AwardEmoji, *Response, error)

GetSnippetAwardEmojiOnNote gets an award emoji on a note from a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) ListIssueAwardEmoji added in v0.8.0

func (s *AwardEmojiService) ListIssueAwardEmoji(pid interface{}, issueIID int, opt *ListAwardEmojiOptions, options ...RequestOptionFunc) ([]*AwardEmoji, *Response, error)

ListIssueAwardEmoji gets a list of all award emoji on the issue.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#list-an-awardable-39-s-award-emoji

func (*AwardEmojiService) ListIssuesAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) ListIssuesAwardEmojiOnNote(pid interface{}, issueID, noteID int, opt *ListAwardEmojiOptions, options ...RequestOptionFunc) ([]*AwardEmoji, *Response, error)

ListIssuesAwardEmojiOnNote gets a list of all award emoji on a note from the issue.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) ListMergeRequestAwardEmoji added in v0.8.0

func (s *AwardEmojiService) ListMergeRequestAwardEmoji(pid interface{}, mergeRequestIID int, opt *ListAwardEmojiOptions, options ...RequestOptionFunc) ([]*AwardEmoji, *Response, error)

ListMergeRequestAwardEmoji gets a list of all award emoji on the merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#list-an-awardable-39-s-award-emoji

func (*AwardEmojiService) ListMergeRequestAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) ListMergeRequestAwardEmojiOnNote(pid interface{}, mergeRequestIID, noteID int, opt *ListAwardEmojiOptions, options ...RequestOptionFunc) ([]*AwardEmoji, *Response, error)

ListMergeRequestAwardEmojiOnNote gets a list of all award emoji on a note from the merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

func (*AwardEmojiService) ListSnippetAwardEmoji added in v0.8.0

func (s *AwardEmojiService) ListSnippetAwardEmoji(pid interface{}, snippetID int, opt *ListAwardEmojiOptions, options ...RequestOptionFunc) ([]*AwardEmoji, *Response, error)

ListSnippetAwardEmoji gets a list of all award emoji on the snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#list-an-awardable-39-s-award-emoji

func (*AwardEmojiService) ListSnippetAwardEmojiOnNote added in v0.8.0

func (s *AwardEmojiService) ListSnippetAwardEmojiOnNote(pid interface{}, snippetIID, noteID int, opt *ListAwardEmojiOptions, options ...RequestOptionFunc) ([]*AwardEmoji, *Response, error)

ListSnippetAwardEmojiOnNote gets a list of all award emoji on a note from the snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-emoji-on-notes

type BadgeKind added in v0.39.1

type BadgeKind string

BadgeKind represents a GitLab Badge Kind

const (
	ProjectBadgeKind BadgeKind = "project"
	GroupBadgeKind   BadgeKind = "group"
)

all possible values Badge Kind

type BaseSystemEvent added in v0.39.1

type BaseSystemEvent struct {
	EventName string `json:"event_name"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

BaseSystemEvent contains system hook's common properties.

GitLab API docs: https://docs.gitlab.com/ee/system_hooks/system_hooks.html

type BasicUser added in v0.39.1

type BasicUser struct {
	ID        int        `json:"id"`
	Username  string     `json:"username"`
	Name      string     `json:"name"`
	State     string     `json:"state"`
	CreatedAt *time.Time `json:"created_at"`
	AvatarURL string     `json:"avatar_url"`
	WebURL    string     `json:"web_url"`
}

BasicUser included in other service responses (such as merge requests, pipelines, etc).

type Blob added in v0.9.0

type Blob struct {
	Basename  string `json:"basename"`
	Data      string `json:"data"`
	Filename  string `json:"filename"`
	ID        int    `json:"id"`
	Ref       string `json:"ref"`
	Startline int    `json:"startline"`
	ProjectID int    `json:"project_id"`
}

Blob represents a single blob.

type BoardList added in v0.8.0

type BoardList struct {
	ID       int    `json:"id"`
	Label    *Label `json:"label"`
	Position int    `json:"position"`
}

BoardList represents a GitLab board list.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html

func (BoardList) String added in v0.8.0

func (b BoardList) String() string

type BoolValue added in v0.11.0

type BoolValue bool

BoolValue is a boolean value with advanced json unmarshaling features.

func (*BoolValue) UnmarshalJSON added in v0.11.0

func (t *BoolValue) UnmarshalJSON(b []byte) error

UnmarshalJSON allows 1, 0, "true", and "false" to be considered as boolean values Needed for: https://gitlab.com/gitlab-org/gitlab-ce/issues/50122 https://gitlab.com/gitlab-org/gitlab/-/issues/233941 https://github.com/gitlabhq/terraform-provider-gitlab/issues/348

type Branch

type Branch struct {
	Commit             *Commit `json:"commit"`
	Name               string  `json:"name"`
	Protected          bool    `json:"protected"`
	Merged             bool    `json:"merged"`
	Default            bool    `json:"default"`
	CanPush            bool    `json:"can_push"`
	DevelopersCanPush  bool    `json:"developers_can_push"`
	DevelopersCanMerge bool    `json:"developers_can_merge"`
	WebURL             string  `json:"web_url"`
}

Branch represents a GitLab branch.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html

func (Branch) String

func (b Branch) String() string

type BranchAccessDescription added in v0.7.4

type BranchAccessDescription struct {
	AccessLevel            AccessLevelValue `json:"access_level"`
	UserID                 int              `json:"user_id"`
	GroupID                int              `json:"group_id"`
	AccessLevelDescription string           `json:"access_level_description"`
}

BranchAccessDescription represents the access description for a protected branch.

GitLab API docs: https://docs.gitlab.com/ce/api/protected_branches.html#protected-branches-api

type BranchesService

type BranchesService struct {
	// contains filtered or unexported fields
}

BranchesService handles communication with the branch related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html

func (*BranchesService) CreateBranch

func (s *BranchesService) CreateBranch(pid interface{}, opt *CreateBranchOptions, options ...RequestOptionFunc) (*Branch, *Response, error)

CreateBranch creates branch from commit SHA or existing branch.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html#create-repository-branch

func (*BranchesService) DeleteBranch

func (s *BranchesService) DeleteBranch(pid interface{}, branch string, options ...RequestOptionFunc) (*Response, error)

DeleteBranch deletes an existing branch.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html#delete-repository-branch

func (*BranchesService) DeleteMergedBranches added in v0.6.0

func (s *BranchesService) DeleteMergedBranches(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteMergedBranches deletes all branches that are merged into the project's default branch.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html#delete-merged-branches

func (*BranchesService) GetBranch

func (s *BranchesService) GetBranch(pid interface{}, branch string, options ...RequestOptionFunc) (*Branch, *Response, error)

GetBranch gets a single project repository branch.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html#get-single-repository-branch

func (*BranchesService) ListBranches

func (s *BranchesService) ListBranches(pid interface{}, opts *ListBranchesOptions, options ...RequestOptionFunc) ([]*Branch, *Response, error)

ListBranches gets a list of repository branches from a project, sorted by name alphabetically.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html#list-repository-branches

func (*BranchesService) ProtectBranch

func (s *BranchesService) ProtectBranch(pid interface{}, branch string, opts *ProtectBranchOptions, options ...RequestOptionFunc) (*Branch, *Response, error)

ProtectBranch protects a single project repository branch. This is an idempotent function, protecting an already protected repository branch still returns a 200 OK status code.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html#protect-repository-branch

func (*BranchesService) UnprotectBranch

func (s *BranchesService) UnprotectBranch(pid interface{}, branch string, options ...RequestOptionFunc) (*Branch, *Response, error)

UnprotectBranch unprotects a single project repository branch. This is an idempotent function, unprotecting an already unprotected repository branch still returns a 200 OK status code.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html#unprotect-repository-branch

type Bridge added in v0.39.1

type Bridge struct {
	Commit       *Commit    `json:"commit"`
	Coverage     float64    `json:"coverage"`
	AllowFailure bool       `json:"allow_failure"`
	CreatedAt    *time.Time `json:"created_at"`
	StartedAt    *time.Time `json:"started_at"`
	FinishedAt   *time.Time `json:"finished_at"`
	Duration     float64    `json:"duration"`
	ID           int        `json:"id"`
	Name         string     `json:"name"`
	Pipeline     struct {
		ID        int        `json:"id"`
		Ref       string     `json:"ref"`
		Sha       string     `json:"sha"`
		Status    string     `json:"status"`
		CreatedAt *time.Time `json:"created_at"`
		UpdateAt  *time.Time `json:"updated_at"`
		WebURL    string     `json:"web_url"`
	} `json:"pipeline"`
	Ref                string `json:"ref"`
	Stage              string `json:"stage"`
	Status             string `json:"status"`
	Tag                bool   `json:"tag"`
	WebURL             string `json:"web_url"`
	User               *User  `json:"user"`
	DownstreamPipeline struct {
		ID        int        `json:"id"`
		Sha       string     `json:"sha"`
		Ref       string     `json:"ref"`
		Status    string     `json:"status"`
		CreatedAt *time.Time `json:"created_at"`
		UpdateAt  *time.Time `json:"updated_at"`
		WebURL    string     `json:"web_url"`
	} `json:"downstream_pipeline"`
}

Bridge represents a pipeline bridge.

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html#list-pipeline-bridges

type BroadcastMessage added in v0.8.1

type BroadcastMessage struct {
	Message  string     `json:"message"`
	StartsAt *time.Time `json:"starts_at"`
	EndsAt   *time.Time `json:"ends_at"`
	Color    string     `json:"color"`
	Font     string     `json:"font"`
	ID       int        `json:"id"`
	Active   bool       `json:"active"`
}

BroadcastMessage represents a GitLab issue board.

GitLab API docs: https://docs.gitlab.com/ce/api/broadcast_messages.html#get-all-broadcast-messages

type BroadcastMessagesService added in v0.8.1

type BroadcastMessagesService struct {
	// contains filtered or unexported fields
}

BroadcastMessagesService handles communication with the broadcast messages methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/broadcast_messages.html

func (*BroadcastMessagesService) CreateBroadcastMessage added in v0.8.1

CreateBroadcastMessage creates a message to broadcast.

GitLab API docs: https://docs.gitlab.com/ce/api/broadcast_messages.html#create-a-broadcast-message

func (*BroadcastMessagesService) DeleteBroadcastMessage added in v0.8.1

func (s *BroadcastMessagesService) DeleteBroadcastMessage(broadcast int, options ...RequestOptionFunc) (*Response, error)

DeleteBroadcastMessage deletes a broadcasted message.

GitLab API docs: https://docs.gitlab.com/ce/api/broadcast_messages.html#delete-a-broadcast-message

func (*BroadcastMessagesService) GetBroadcastMessage added in v0.8.1

func (s *BroadcastMessagesService) GetBroadcastMessage(broadcast int, options ...RequestOptionFunc) (*BroadcastMessage, *Response, error)

GetBroadcastMessage gets a single broadcast message.

GitLab API docs: https://docs.gitlab.com/ce/api/broadcast_messages.html#get-a-specific-broadcast-message

func (*BroadcastMessagesService) ListBroadcastMessages added in v0.8.1

ListBroadcastMessages gets a list of all broadcasted messages.

GitLab API docs: https://docs.gitlab.com/ce/api/broadcast_messages.html#get-all-broadcast-messages

func (*BroadcastMessagesService) UpdateBroadcastMessage added in v0.8.1

func (s *BroadcastMessagesService) UpdateBroadcastMessage(broadcast int, opt *UpdateBroadcastMessageOptions, options ...RequestOptionFunc) (*BroadcastMessage, *Response, error)

UpdateBroadcastMessage update a broadcasted message.

GitLab API docs: https://docs.gitlab.com/ce/api/broadcast_messages.html#update-a-broadcast-message

type BuildEvent added in v0.4.0

type BuildEvent struct {
	ObjectKind        string  `json:"object_kind"`
	Ref               string  `json:"ref"`
	Tag               bool    `json:"tag"`
	BeforeSHA         string  `json:"before_sha"`
	SHA               string  `json:"sha"`
	BuildID           int     `json:"build_id"`
	BuildName         string  `json:"build_name"`
	BuildStage        string  `json:"build_stage"`
	BuildStatus       string  `json:"build_status"`
	BuildStartedAt    string  `json:"build_started_at"`
	BuildFinishedAt   string  `json:"build_finished_at"`
	BuildDuration     float64 `json:"build_duration"`
	BuildAllowFailure bool    `json:"build_allow_failure"`
	ProjectID         int     `json:"project_id"`
	ProjectName       string  `json:"project_name"`
	User              struct {
		ID    int    `json:"id"`
		Name  string `json:"name"`
		Email string `json:"email"`
	} `json:"user"`
	Commit struct {
		ID          int    `json:"id"`
		SHA         string `json:"sha"`
		Message     string `json:"message"`
		AuthorName  string `json:"author_name"`
		AuthorEmail string `json:"author_email"`
		Status      string `json:"status"`
		Duration    int    `json:"duration"`
		StartedAt   string `json:"started_at"`
		FinishedAt  string `json:"finished_at"`
	} `json:"commit"`
	Repository *Repository `json:"repository"`
}

BuildEvent represents a build event

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#build-events

type BuildStateValue added in v0.8.0

type BuildStateValue string

BuildStateValue represents a GitLab build state.

const (
	Pending  BuildStateValue = "pending"
	Created  BuildStateValue = "created"
	Running  BuildStateValue = "running"
	Success  BuildStateValue = "success"
	Failed   BuildStateValue = "failed"
	Canceled BuildStateValue = "canceled"
	Skipped  BuildStateValue = "skipped"
	Manual   BuildStateValue = "manual"
)

These constants represent all valid build states.

func BuildState

func BuildState(v BuildStateValue) *BuildStateValue

BuildState is a helper routine that allocates a new BuildStateValue to store v and returns a pointer to it.

type BurndownChartEvent added in v0.39.1

type BurndownChartEvent struct {
	CreatedAt *time.Time `json:"created_at"`
	Weight    *int       `json:"weight"`
	Action    *string    `json:"action"`
}

type CIYMLTemplate added in v0.11.1

type CIYMLTemplate struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

CIYMLTemplate represents a GitLab CI YML template.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html

type CIYMLTemplatesService added in v0.11.1

type CIYMLTemplatesService struct {
	// contains filtered or unexported fields
}

CIYMLTemplatesService handles communication with the gitlab CI YML templates related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html

func (*CIYMLTemplatesService) GetTemplate added in v0.11.1

func (s *CIYMLTemplatesService) GetTemplate(key string, options ...RequestOptionFunc) (*CIYMLTemplate, *Response, error)

GetTemplate get a single GitLab CI YML template.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html#single-gitlab-ci-yml-template

func (*CIYMLTemplatesService) ListAllTemplates added in v0.11.1

func (s *CIYMLTemplatesService) ListAllTemplates(opt *ListCIYMLTemplatesOptions, options ...RequestOptionFunc) ([]*CIYMLTemplate, *Response, error)

ListAllTemplates get all GitLab CI YML templates.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/gitlab_ci_ymls.html#list-gitlab-ci-yml-templates

type ChangeAllowedApproversOptions added in v0.39.1

type ChangeAllowedApproversOptions struct {
	ApproverIDs      []int `url:"approver_ids,omitempty" json:"approver_ids,omitempty"`
	ApproverGroupIDs []int `url:"approver_group_ids,omitempty" json:"approver_group_ids,omitempty"`
}

ChangeAllowedApproversOptions represents the available ChangeAllowedApprovers() options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#change-allowed-approvers

type ChangeApprovalConfigurationOptions added in v0.39.1

type ChangeApprovalConfigurationOptions struct {
	ApprovalsBeforeMerge                      *int  `url:"approvals_before_merge,omitempty" json:"approvals_before_merge,omitempty"`
	ResetApprovalsOnPush                      *bool `url:"reset_approvals_on_push,omitempty" json:"reset_approvals_on_push,omitempty"`
	DisableOverridingApproversPerMergeRequest *bool `` /* 126-byte string literal not displayed */
	MergeRequestsAuthorApproval               *bool `url:"merge_requests_author_approval,omitempty" json:"merge_requests_author_approval,omitempty"`
	MergeRequestsDisableCommittersApproval    *bool `url:"merge_requests_disable_committers_approval,omitempty" json:"merge_requests_disable_committers_approval,omitempty"`
}

ChangeApprovalConfigurationOptions represents the available ApprovalConfiguration() options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#change-configuration

type ChangeMergeRequestAllowedApproversOptions added in v0.39.1

type ChangeMergeRequestAllowedApproversOptions struct {
	ApproverIDs      []int `url:"approver_ids" json:"approver_ids"`
	ApproverGroupIDs []int `url:"approver_group_ids" json:"approver_group_ids"`
}

ChangeMergeRequestAllowedApproversOptions represents the available ChangeMergeRequestAllowedApprovers() options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#change-allowed-approvers-for-merge-request

type ChangeMergeRequestApprovalConfigurationOptions added in v0.39.1

type ChangeMergeRequestApprovalConfigurationOptions struct {
	ApprovalsRequired *int `url:"approvals_required,omitempty" json:"approvals_required,omitempty"`
}

ChangeMergeRequestApprovalConfigurationOptions represents the available ChangeMergeRequestApprovalConfiguration() options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#change-approval-configuration

type CherryPickCommitOptions added in v0.4.1

type CherryPickCommitOptions struct {
	Branch *string `url:"branch,omitempty" json:"branch,omitempty"`
}

CherryPickCommitOptions represents the available CherryPickCommit() options.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#cherry-pick-a-commit

type Client

type Client struct {

	// User agent used when communicating with the GitLab API.
	UserAgent string

	// Services used for talking to different parts of the GitLab API.
	AccessRequests        *AccessRequestsService
	Applications          *ApplicationsService
	AwardEmoji            *AwardEmojiService
	Boards                *IssueBoardsService
	Branches              *BranchesService
	BroadcastMessage      *BroadcastMessagesService
	CIYMLTemplate         *CIYMLTemplatesService
	Commits               *CommitsService
	ContainerRegistry     *ContainerRegistryService
	CustomAttribute       *CustomAttributesService
	DeployKeys            *DeployKeysService
	DeployTokens          *DeployTokensService
	Deployments           *DeploymentsService
	Discussions           *DiscussionsService
	Environments          *EnvironmentsService
	EpicIssues            *EpicIssuesService
	Epics                 *EpicsService
	Events                *EventsService
	Features              *FeaturesService
	GitIgnoreTemplates    *GitIgnoreTemplatesService
	GroupBadges           *GroupBadgesService
	GroupCluster          *GroupClustersService
	GroupIssueBoards      *GroupIssueBoardsService
	GroupLabels           *GroupLabelsService
	GroupMembers          *GroupMembersService
	GroupMilestones       *GroupMilestonesService
	GroupVariables        *GroupVariablesService
	Groups                *GroupsService
	InstanceCluster       *InstanceClustersService
	InstanceVariables     *InstanceVariablesService
	IssueLinks            *IssueLinksService
	Issues                *IssuesService
	IssuesStatistics      *IssuesStatisticsService
	Jobs                  *JobsService
	Keys                  *KeysService
	Labels                *LabelsService
	License               *LicenseService
	LicenseTemplates      *LicenseTemplatesService
	MergeRequestApprovals *MergeRequestApprovalsService
	MergeRequests         *MergeRequestsService
	Milestones            *MilestonesService
	Namespaces            *NamespacesService
	Notes                 *NotesService
	NotificationSettings  *NotificationSettingsService
	PagesDomains          *PagesDomainsService
	PipelineSchedules     *PipelineSchedulesService
	PipelineTriggers      *PipelineTriggersService
	Pipelines             *PipelinesService
	ProjectBadges         *ProjectBadgesService
	ProjectCluster        *ProjectClustersService
	ProjectImportExport   *ProjectImportExportService
	ProjectMembers        *ProjectMembersService
	ProjectMirrors        *ProjectMirrorService
	ProjectSnippets       *ProjectSnippetsService
	ProjectVariables      *ProjectVariablesService
	Projects              *ProjectsService
	ProtectedBranches     *ProtectedBranchesService
	ProtectedTags         *ProtectedTagsService
	ReleaseLinks          *ReleaseLinksService
	Releases              *ReleasesService
	Repositories          *RepositoriesService
	RepositoryFiles       *RepositoryFilesService
	ResourceLabelEvents   *ResourceLabelEventsService
	Runners               *RunnersService
	Search                *SearchService
	Services              *ServicesService
	Settings              *SettingsService
	Sidekiq               *SidekiqService
	Snippets              *SnippetsService
	SystemHooks           *SystemHooksService
	Tags                  *TagsService
	Todos                 *TodosService
	Users                 *UsersService
	Validate              *ValidateService
	Version               *VersionService
	Wikis                 *WikisService
	// contains filtered or unexported fields
}

A Client manages communication with the GitLab API.

func NewBasicAuthClient added in v0.10.1

func NewBasicAuthClient(username, password string, options ...ClientOptionFunc) (*Client, error)

NewBasicAuthClient returns a new GitLab API client. To use API methods which require authentication, provide a valid username and password.

func NewClient

func NewClient(token string, options ...ClientOptionFunc) (*Client, error)

NewClient returns a new GitLab API client. To use API methods which require authentication, provide a valid private or personal token.

func NewCookieClient added in v0.39.1

func NewCookieClient(cookie string, options ...ClientOptionFunc) (*Client, error)

NewClient returns a new GitLab API client. To use API methods which require authentication, provide a valid private or personal token.

func NewOAuthClient

func NewOAuthClient(token string, options ...ClientOptionFunc) (*Client, error)

NewOAuthClient returns a new GitLab API client. To use API methods which require authentication, provide a valid oauth token.

func (*Client) BaseURL

func (c *Client) BaseURL() *url.URL

BaseURL return a copy of the baseURL.

func (*Client) Do

func (c *Client) Do(req *retryablehttp.Request, v interface{}) (*Response, error)

Do sends an API request and returns the API response. The API response is JSON decoded and stored in the value pointed to by v, or returned as an error if an API error has occurred. If v implements the io.Writer interface, the raw response body will be written to v, without attempting to first decode it.

func (*Client) NewRequest

func (c *Client) NewRequest(method, path string, opt interface{}, options []RequestOptionFunc) (*retryablehttp.Request, error)

NewRequest creates an API request. A relative URL path can be provided in path, in which case it is resolved relative to the base URL of the Client. Relative URL paths should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included as the request body.

type ClientOptionFunc added in v0.39.1

type ClientOptionFunc func(*Client) error

ClientOptionFunc can be used customize a new GitLab API client.

func WithBaseURL added in v0.39.1

func WithBaseURL(urlStr string) ClientOptionFunc

WithBaseURL sets the base URL for API requests to a custom endpoint.

func WithCustomBackoff added in v0.39.1

func WithCustomBackoff(backoff retryablehttp.Backoff) ClientOptionFunc

WithCustomBackoff can be used to configure a custom backoff policy.

func WithCustomLimiter added in v0.39.1

func WithCustomLimiter(limiter RateLimiter) ClientOptionFunc

WithCustomLimiter injects a custom rate limiter to the client.

func WithCustomRetry added in v0.39.1

func WithCustomRetry(checkRetry retryablehttp.CheckRetry) ClientOptionFunc

WithCustomRetry can be used to configure a custom retry policy.

func WithHTTPClient added in v0.39.1

func WithHTTPClient(httpClient *http.Client) ClientOptionFunc

WithHTTPClient can be used to configure a custom HTTP client.

func WithoutRetries added in v0.39.1

func WithoutRetries() ClientOptionFunc

WithoutRetries disables the default retry logic.

type Commit

type Commit struct {
	ID             string           `json:"id"`
	ShortID        string           `json:"short_id"`
	Title          string           `json:"title"`
	AuthorName     string           `json:"author_name"`
	AuthorEmail    string           `json:"author_email"`
	AuthoredDate   *time.Time       `json:"authored_date"`
	CommitterName  string           `json:"committer_name"`
	CommitterEmail string           `json:"committer_email"`
	CommittedDate  *time.Time       `json:"committed_date"`
	CreatedAt      *time.Time       `json:"created_at"`
	Message        string           `json:"message"`
	ParentIDs      []string         `json:"parent_ids"`
	Stats          *CommitStats     `json:"stats"`
	Status         *BuildStateValue `json:"status"`
	LastPipeline   *PipelineInfo    `json:"last_pipeline"`
	ProjectID      int              `json:"project_id"`
	WebURL         string           `json:"web_url"`
}

Commit represents a GitLab commit.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html

func (Commit) String

func (c Commit) String() string

type CommitActionOptions added in v0.39.1

type CommitActionOptions struct {
	Action          *FileAction `url:"action,omitempty" json:"action,omitempty"`
	FilePath        *string     `url:"file_path,omitempty" json:"file_path,omitempty"`
	PreviousPath    *string     `url:"previous_path,omitempty" json:"previous_path,omitempty"`
	Content         *string     `url:"content,omitempty" json:"content,omitempty"`
	Encoding        *string     `url:"encoding,omitempty" json:"encoding,omitempty"`
	LastCommitID    *string     `url:"last_commit_id,omitempty" json:"last_commit_id,omitempty"`
	ExecuteFilemode *bool       `url:"execute_filemode,omitempty" json:"execute_filemode,omitempty"`
}

CommitActionOptions represents the available options for a new single file action.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions

type CommitComment

type CommitComment struct {
	Note     string `json:"note"`
	Path     string `json:"path"`
	Line     int    `json:"line"`
	LineType string `json:"line_type"`
	Author   Author `json:"author"`
}

CommitComment represents a GitLab commit comment.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html

func (CommitComment) String

func (c CommitComment) String() string

type CommitCommentEvent added in v0.3.1

type CommitCommentEvent struct {
	ObjectKind string `json:"object_kind"`
	User       *User  `json:"user"`
	ProjectID  int    `json:"project_id"`
	Project    struct {
		Name              string          `json:"name"`
		Description       string          `json:"description"`
		AvatarURL         string          `json:"avatar_url"`
		GitSSHURL         string          `json:"git_ssh_url"`
		GitHTTPURL        string          `json:"git_http_url"`
		Namespace         string          `json:"namespace"`
		PathWithNamespace string          `json:"path_with_namespace"`
		DefaultBranch     string          `json:"default_branch"`
		Homepage          string          `json:"homepage"`
		URL               string          `json:"url"`
		SSHURL            string          `json:"ssh_url"`
		HTTPURL           string          `json:"http_url"`
		WebURL            string          `json:"web_url"`
		Visibility        VisibilityValue `json:"visibility"`
	} `json:"project"`
	Repository       *Repository `json:"repository"`
	ObjectAttributes struct {
		ID           int    `json:"id"`
		Note         string `json:"note"`
		NoteableType string `json:"noteable_type"`
		AuthorID     int    `json:"author_id"`
		CreatedAt    string `json:"created_at"`
		UpdatedAt    string `json:"updated_at"`
		ProjectID    int    `json:"project_id"`
		Attachment   string `json:"attachment"`
		LineCode     string `json:"line_code"`
		CommitID     string `json:"commit_id"`
		NoteableID   int    `json:"noteable_id"`
		System       bool   `json:"system"`
		StDiff       struct {
			Diff        string `json:"diff"`
			NewPath     string `json:"new_path"`
			OldPath     string `json:"old_path"`
			AMode       string `json:"a_mode"`
			BMode       string `json:"b_mode"`
			NewFile     bool   `json:"new_file"`
			RenamedFile bool   `json:"renamed_file"`
			DeletedFile bool   `json:"deleted_file"`
		} `json:"st_diff"`
	} `json:"object_attributes"`
	Commit *struct {
		ID        string     `json:"id"`
		Message   string     `json:"message"`
		Timestamp *time.Time `json:"timestamp"`
		URL       string     `json:"url"`
		Author    struct {
			Name  string `json:"name"`
			Email string `json:"email"`
		} `json:"author"`
	} `json:"commit"`
}

CommitCommentEvent represents a comment on a commit event.

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#comment-on-commit

type CommitRef added in v0.10.8

type CommitRef struct {
	Type string `json:"type"`
	Name string `json:"name"`
}

CommitRef represents the reference of branches/tags in a commit.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-references-a-commit-is-pushed-to

type CommitStats added in v0.4.1

type CommitStats struct {
	Additions int `json:"additions"`
	Deletions int `json:"deletions"`
	Total     int `json:"total"`
}

CommitStats represents the number of added and deleted files in a commit.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html

type CommitStatus

type CommitStatus struct {
	ID          int        `json:"id"`
	SHA         string     `json:"sha"`
	Ref         string     `json:"ref"`
	Status      string     `json:"status"`
	Name        string     `json:"name"`
	TargetURL   string     `json:"target_url"`
	Description string     `json:"description"`
	CreatedAt   *time.Time `json:"created_at"`
	StartedAt   *time.Time `json:"started_at"`
	FinishedAt  *time.Time `json:"finished_at"`
	Author      Author     `json:"author"`
}

CommitStatus represents a GitLab commit status.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit

type CommitsService

type CommitsService struct {
	// contains filtered or unexported fields
}

CommitsService handles communication with the commit related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html

func (*CommitsService) CherryPickCommit added in v0.4.1

func (s *CommitsService) CherryPickCommit(pid interface{}, sha string, opt *CherryPickCommitOptions, options ...RequestOptionFunc) (*Commit, *Response, error)

CherryPickCommit cherry picks a commit to a given branch.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#cherry-pick-a-commit

func (*CommitsService) CreateCommit added in v0.4.1

func (s *CommitsService) CreateCommit(pid interface{}, opt *CreateCommitOptions, options ...RequestOptionFunc) (*Commit, *Response, error)

CreateCommit creates a commit with multiple files and actions.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions

func (*CommitsService) GetCommit

func (s *CommitsService) GetCommit(pid interface{}, sha string, options ...RequestOptionFunc) (*Commit, *Response, error)

GetCommit gets a specific commit identified by the commit hash or name of a branch or tag.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-a-single-commit

func (*CommitsService) GetCommitComments

func (s *CommitsService) GetCommitComments(pid interface{}, sha string, opt *GetCommitCommentsOptions, options ...RequestOptionFunc) ([]*CommitComment, *Response, error)

GetCommitComments gets the comments of a commit in a project.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-comments-of-a-commit

func (*CommitsService) GetCommitDiff

func (s *CommitsService) GetCommitDiff(pid interface{}, sha string, opt *GetCommitDiffOptions, options ...RequestOptionFunc) ([]*Diff, *Response, error)

GetCommitDiff gets the diff of a commit in a project..

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-diff-of-a-commit

func (*CommitsService) GetCommitRefs added in v0.10.8

func (s *CommitsService) GetCommitRefs(pid interface{}, sha string, opt *GetCommitRefsOptions, options ...RequestOptionFunc) ([]*CommitRef, *Response, error)

GetCommitRefs gets all references (from branches or tags) a commit is pushed to

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-references-a-commit-is-pushed-to

func (*CommitsService) GetCommitStatuses

func (s *CommitsService) GetCommitStatuses(pid interface{}, sha string, opt *GetCommitStatusesOptions, options ...RequestOptionFunc) ([]*CommitStatus, *Response, error)

GetCommitStatuses gets the statuses of a commit in a project.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit

func (*CommitsService) GetGPGSiganature added in v0.39.1

func (s *CommitsService) GetGPGSiganature(pid interface{}, sha string, options ...RequestOptionFunc) (*GPGSignature, *Response, error)

GetGPGSiganature gets a GPG signature of a commit.

GitLab API docs: https://docs.gitlab.com/ee/api/commits.html#get-gpg-signature-of-a-commit

func (*CommitsService) GetMergeRequestsByCommit added in v0.11.0

func (s *CommitsService) GetMergeRequestsByCommit(pid interface{}, sha string, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

GetMergeRequestsByCommit gets merge request associated with a commit.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#list-merge-requests-associated-with-a-commit

func (*CommitsService) ListCommits

func (s *CommitsService) ListCommits(pid interface{}, opt *ListCommitsOptions, options ...RequestOptionFunc) ([]*Commit, *Response, error)

ListCommits gets a list of repository commits in a project.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#list-commits

func (*CommitsService) PostCommitComment

func (s *CommitsService) PostCommitComment(pid interface{}, sha string, opt *PostCommitCommentOptions, options ...RequestOptionFunc) (*CommitComment, *Response, error)

PostCommitComment adds a comment to a commit. Optionally you can post comments on a specific line of a commit. Therefor both path, line_new and line_old are required.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#post-comment-to-commit

func (*CommitsService) RevertCommit added in v0.39.1

func (s *CommitsService) RevertCommit(pid interface{}, sha string, opt *RevertCommitOptions, options ...RequestOptionFunc) (*Commit, *Response, error)

RevertCommit reverts a commit in a given branch.

GitLab API docs: https://docs.gitlab.com/ee/api/commits.html#revert-a-commit

func (*CommitsService) SetCommitStatus

func (s *CommitsService) SetCommitStatus(pid interface{}, sha string, opt *SetCommitStatusOptions, options ...RequestOptionFunc) (*CommitStatus, *Response, error)

SetCommitStatus sets the status of a commit in a project.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#post-the-status-to-commit

type Compare

type Compare struct {
	Commit         *Commit   `json:"commit"`
	Commits        []*Commit `json:"commits"`
	Diffs          []*Diff   `json:"diffs"`
	CompareTimeout bool      `json:"compare_timeout"`
	CompareSameRef bool      `json:"compare_same_ref"`
}

Compare represents the result of a comparison of branches, tags or commits.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits

func (Compare) String

func (c Compare) String() string

type CompareOptions

type CompareOptions struct {
	From     *string `url:"from,omitempty" json:"from,omitempty"`
	To       *string `url:"to,omitempty" json:"to,omitempty"`
	Straight *bool   `url:"straight,omitempty" json:"straight,omitempty"`
}

CompareOptions represents the available Compare() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits

type CompoundMetrics added in v0.8.1

type CompoundMetrics struct {
	QueueMetrics
	ProcessMetrics
	JobStats
}

CompoundMetrics represents the GitLab sidekiq compounded stats.

GitLab API docs: https://docs.gitlab.com/ce/api/sidekiq_metrics.html#get-a-compound-response-of-all-the-previously-mentioned-metrics

type ContainerRegistryService added in v0.39.1

type ContainerRegistryService struct {
	// contains filtered or unexported fields
}

ContainerRegistryService handles communication with the container registry related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html

func (*ContainerRegistryService) DeleteRegistryRepository added in v0.39.1

func (s *ContainerRegistryService) DeleteRegistryRepository(pid interface{}, repository int, options ...RequestOptionFunc) (*Response, error)

DeleteRegistryRepository deletes a repository in a registry.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html#delete-registry-repository

func (*ContainerRegistryService) DeleteRegistryRepositoryTag added in v0.39.1

func (s *ContainerRegistryService) DeleteRegistryRepositoryTag(pid interface{}, repository int, tagName string, options ...RequestOptionFunc) (*Response, error)

DeleteRegistryRepositoryTag deletes a registry repository tag.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html#delete-a-repository-tag

func (*ContainerRegistryService) DeleteRegistryRepositoryTags added in v0.39.1

func (s *ContainerRegistryService) DeleteRegistryRepositoryTags(pid interface{}, repository int, opt *DeleteRegistryRepositoryTagsOptions, options ...RequestOptionFunc) (*Response, error)

DeleteRegistryRepositoryTags deletes repository tags in bulk based on given criteria.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html#delete-repository-tags-in-bulk

func (*ContainerRegistryService) GetRegistryRepositoryTagDetail added in v0.39.1

func (s *ContainerRegistryService) GetRegistryRepositoryTagDetail(pid interface{}, repository int, tagName string, options ...RequestOptionFunc) (*RegistryRepositoryTag, *Response, error)

GetRegistryRepositoryTagDetail get details of a registry repository tag

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html#get-details-of-a-repository-tag

func (*ContainerRegistryService) ListRegistryRepositories added in v0.39.1

func (s *ContainerRegistryService) ListRegistryRepositories(pid interface{}, opt *ListRegistryRepositoriesOptions, options ...RequestOptionFunc) ([]*RegistryRepository, *Response, error)

ListRegistryRepositories gets a list of registry repositories in a project.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html#list-registry-repositories

func (*ContainerRegistryService) ListRegistryRepositoryTags added in v0.39.1

func (s *ContainerRegistryService) ListRegistryRepositoryTags(pid interface{}, repository int, opt *ListRegistryRepositoryTagsOptions, options ...RequestOptionFunc) ([]*RegistryRepositoryTag, *Response, error)

ListRegistryRepositoryTags gets a list of tags for given registry repository.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html#list-repository-tags

type ContributionEvent added in v0.8.0

type ContributionEvent struct {
	Title       string     `json:"title"`
	ProjectID   int        `json:"project_id"`
	ActionName  string     `json:"action_name"`
	TargetID    int        `json:"target_id"`
	TargetIID   int        `json:"target_iid"`
	TargetType  string     `json:"target_type"`
	AuthorID    int        `json:"author_id"`
	TargetTitle string     `json:"target_title"`
	CreatedAt   *time.Time `json:"created_at"`
	PushData    struct {
		CommitCount int    `json:"commit_count"`
		Action      string `json:"action"`
		RefType     string `json:"ref_type"`
		CommitFrom  string `json:"commit_from"`
		CommitTo    string `json:"commit_to"`
		Ref         string `json:"ref"`
		CommitTitle string `json:"commit_title"`
	} `json:"push_data"`
	Note   *Note `json:"note"`
	Author struct {
		Name      string `json:"name"`
		Username  string `json:"username"`
		ID        int    `json:"id"`
		State     string `json:"state"`
		AvatarURL string `json:"avatar_url"`
		WebURL    string `json:"web_url"`
	} `json:"author"`
	AuthorUsername string `json:"author_username"`
}

ContributionEvent represents a user's contribution

GitLab API docs: https://docs.gitlab.com/ce/api/events.html#get-user-contribution-events

type Contributor

type Contributor struct {
	Name      string `json:"name"`
	Email     string `json:"email"`
	Commits   int    `json:"commits"`
	Additions int    `json:"additions"`
	Deletions int    `json:"deletions"`
}

Contributor represents a GitLap contributor.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributors

func (Contributor) String

func (c Contributor) String() string

type CreateApplicationOptions added in v0.39.1

type CreateApplicationOptions struct {
	Name         *string `url:"name,omitempty" json:"name,omitempty"`
	RedirectURI  *string `url:"redirect_uri,omitempty" json:"redirect_uri,omitempty"`
	Scopes       *string `url:"scopes,omitempty" json:"scopes,omitempty"`
	Confidential *bool   `url:"confidential,omitempty" json:"confidential,omitempty"`
}

CreateApplicationOptions represents the available CreateApplication() options.

GitLab API docs: https://docs.gitlab.com/ce/api/applications.html#create-an-application

type CreateAwardEmojiOptions added in v0.10.6

type CreateAwardEmojiOptions struct {
	Name string `json:"name"`
}

CreateAwardEmojiOptions represents the available options for awarding emoji for a resource

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html#award-a-new-emoji

type CreateBranchOptions

type CreateBranchOptions struct {
	Branch *string `url:"branch,omitempty" json:"branch,omitempty"`
	Ref    *string `url:"ref,omitempty" json:"ref,omitempty"`
}

CreateBranchOptions represents the available CreateBranch() options.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html#create-repository-branch

type CreateBroadcastMessageOptions added in v0.8.1

type CreateBroadcastMessageOptions struct {
	Message  *string    `url:"message" json:"message"`
	StartsAt *time.Time `url:"starts_at,omitempty" json:"starts_at,omitempty"`
	EndsAt   *time.Time `url:"ends_at,omitempty" json:"ends_at,omitempty"`
	Color    *string    `url:"color,omitempty" json:"color,omitempty"`
	Font     *string    `url:"font,omitempty" json:"font,omitempty"`
}

CreateBroadcastMessageOptions represents the available CreateBroadcastMessage() options.

GitLab API docs: https://docs.gitlab.com/ce/api/broadcast_messages.html#create-a-broadcast-message

type CreateCommitDiscussionOptions added in v0.11.2

type CreateCommitDiscussionOptions struct {
	Body      *string       `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time    `url:"created_at,omitempty" json:"created_at,omitempty"`
	Position  *NotePosition `url:"position,omitempty" json:"position,omitempty"`
}

CreateCommitDiscussionOptions represents the available CreateCommitDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#create-new-commit-thread

type CreateCommitOptions added in v0.4.1

type CreateCommitOptions struct {
	Branch        *string                `url:"branch,omitempty" json:"branch,omitempty"`
	CommitMessage *string                `url:"commit_message,omitempty" json:"commit_message,omitempty"`
	StartBranch   *string                `url:"start_branch,omitempty" json:"start_branch,omitempty"`
	StartSHA      *string                `url:"start_sha,omitempty" json:"start_sha,omitempty"`
	StartProject  *string                `url:"start_project,omitempty" json:"start_project,omitempty"`
	Actions       []*CommitActionOptions `url:"actions,omitempty" json:"actions,omitempty"`
	AuthorEmail   *string                `url:"author_email,omitempty" json:"author_email,omitempty"`
	AuthorName    *string                `url:"author_name,omitempty" json:"author_name,omitempty"`
	Stats         *bool                  `url:"stats,omitempty" json:"stats,omitempty"`
	Force         *bool                  `url:"force,omitempty" json:"force,omitempty"`
}

CreateCommitOptions represents the available options for a new commit.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions

type CreateEnvironmentOptions added in v0.7.0

type CreateEnvironmentOptions struct {
	Name        *string `url:"name,omitempty" json:"name,omitempty"`
	ExternalURL *string `url:"external_url,omitempty" json:"external_url,omitempty"`
}

CreateEnvironmentOptions represents the available CreateEnvironment() options.

GitLab API docs: https://docs.gitlab.com/ee/api/environments.html#create-a-new-environment

type CreateEpicDiscussionOptions added in v0.11.2

type CreateEpicDiscussionOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

CreateEpicDiscussionOptions represents the available CreateEpicDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-epic-thread

type CreateEpicNoteOptions added in v0.39.1

type CreateEpicNoteOptions struct {
	Body *string `url:"body,omitempty" json:"body,omitempty"`
}

CreateEpicNoteOptions represents the available CreateEpicNote() options.

GitLab API docs: https://docs.gitlab.com/ee/api/notes.html#create-new-epic-note

type CreateEpicOptions added in v0.39.1

type CreateEpicOptions struct {
	Title            *string  `url:"title,omitempty" json:"title,omitempty"`
	Description      *string  `url:"description,omitempty" json:"description,omitempty"`
	Labels           Labels   `url:"labels,comma,omitempty" json:"labels,omitempty"`
	StartDateIsFixed *bool    `url:"start_date_is_fixed,omitempty" json:"start_date_is_fixed,omitempty"`
	StartDateFixed   *ISOTime `url:"start_date_fixed,omitempty" json:"start_date_fixed,omitempty"`
	DueDateIsFixed   *bool    `url:"due_date_is_fixed,omitempty" json:"due_date_is_fixed,omitempty"`
	DueDateFixed     *ISOTime `url:"due_date_fixed,omitempty" json:"due_date_fixed,omitempty"`
}

CreateEpicOptions represents the available CreateEpic() options.

GitLab API docs: https://docs.gitlab.com/ee/api/epics.html#new-epic

type CreateFileOptions

type CreateFileOptions struct {
	Branch        *string `url:"branch,omitempty" json:"branch,omitempty"`
	Encoding      *string `url:"encoding,omitempty" json:"encoding,omitempty"`
	AuthorEmail   *string `url:"author_email,omitempty" json:"author_email,omitempty"`
	AuthorName    *string `url:"author_name,omitempty" json:"author_name,omitempty"`
	Content       *string `url:"content,omitempty" json:"content,omitempty"`
	CommitMessage *string `url:"commit_message,omitempty" json:"commit_message,omitempty"`
}

CreateFileOptions represents the available CreateFile() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository

type CreateFreezePeriodOptions added in v0.39.1

type CreateFreezePeriodOptions struct {
	FreezeStart  *string `url:"freeze_start,omitempty" json:"freeze_start,omitempty"`
	FreezeEnd    *string `url:"freeze_end,omitempty" json:"freeze_end,omitempty"`
	CronTimezone *string `url:"cron_timezone,omitempty" json:"cron_timezone,omitempty"`
}

CreateFreezePeriodOptions represents the available CreateFreezePeriodOptions() options.

GitLab API docs: https://docs.gitlab.com/ce/api/freeze_periods.html#create-a-freeze-period

type CreateGroupDeployTokenOptions added in v0.39.1

type CreateGroupDeployTokenOptions struct {
	Name      *string    `url:"name,omitempty" json:"name,omitempty"`
	ExpiresAt *time.Time `url:"expires_at,omitempty" json:"expires_at,omitempty"`
	Username  *string    `url:"username,omitempty" json:"username,omitempty"`
	Scopes    []string   `url:"scopes,omitempty" json:"scopes,omitempty"`
}

CreateGroupDeployTokenOptions represents the available CreateGroupDeployToken() options.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#create-a-group-deploy-token

type CreateGroupIssueBoardListOptions added in v0.11.0

type CreateGroupIssueBoardListOptions struct {
	LabelID *int `url:"label_id" json:"label_id"`
}

CreateGroupIssueBoardListOptions represents the available CreateGroupIssueBoardList() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#new-board-list

type CreateGroupIssueBoardOptions added in v0.39.1

type CreateGroupIssueBoardOptions struct {
	Name *string `url:"name" json:"name"`
}

CreateGroupIssueBoardOptions represents the available CreateGroupIssueBoard() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#create-a-group-issue-board-premium

type CreateGroupLabelOptions added in v0.39.1

type CreateGroupLabelOptions CreateLabelOptions

CreateGroupLabelOptions represents the available CreateGroupLabel() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html#create-a-new-group-label

type CreateGroupMilestoneOptions added in v0.10.0

type CreateGroupMilestoneOptions struct {
	Title       *string  `url:"title,omitempty" json:"title,omitempty"`
	Description *string  `url:"description,omitempty" json:"description,omitempty"`
	StartDate   *ISOTime `url:"start_date,omitempty" json:"start_date,omitempty"`
	DueDate     *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"`
}

CreateGroupMilestoneOptions represents the available CreateGroupMilestone() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#create-new-milestone

type CreateGroupOptions

type CreateGroupOptions struct {
	Name                           *string                     `url:"name,omitempty" json:"name,omitempty"`
	Path                           *string                     `url:"path,omitempty" json:"path,omitempty"`
	Description                    *string                     `url:"description,omitempty" json:"description,omitempty"`
	MembershipLock                 *bool                       `url:"membership_lock,omitempty" json:"membership_lock,omitempty"`
	Visibility                     *VisibilityValue            `url:"visibility,omitempty" json:"visibility,omitempty"`
	ShareWithGroupLock             *bool                       `url:"share_with_group_lock,omitempty" json:"share_with_group_lock,omitempty"`
	RequireTwoFactorAuth           *bool                       `url:"require_two_factor_authentication,omitempty" json:"require_two_factor_authentication,omitempty"`
	TwoFactorGracePeriod           *int                        `url:"two_factor_grace_period,omitempty" json:"two_factor_grace_period,omitempty"`
	ProjectCreationLevel           *ProjectCreationLevelValue  `url:"project_creation_level,omitempty" json:"project_creation_level,omitempty"`
	AutoDevopsEnabled              *bool                       `url:"auto_devops_enabled,omitempty" json:"auto_devops_enabled,omitempty"`
	SubGroupCreationLevel          *SubGroupCreationLevelValue `url:"subgroup_creation_level,omitempty" json:"subgroup_creation_level,omitempty"`
	EmailsDisabled                 *bool                       `url:"emails_disabled,omitempty" json:"emails_disabled,omitempty"`
	MentionsDisabled               *bool                       `url:"mentions_disabled,omitempty" json:"mentions_disabled,omitempty"`
	LFSEnabled                     *bool                       `url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"`
	RequestAccessEnabled           *bool                       `url:"request_access_enabled,omitempty" json:"request_access_enabled,omitempty"`
	ParentID                       *int                        `url:"parent_id,omitempty" json:"parent_id,omitempty"`
	SharedRunnersMinutesLimit      *int                        `url:"shared_runners_minutes_limit,omitempty" json:"shared_runners_minutes_limit,omitempty"`
	ExtraSharedRunnersMinutesLimit *int                        `url:"extra_shared_runners_minutes_limit,omitempty" json:"extra_shared_runners_minutes_limit,omitempty"`
}

CreateGroupOptions represents the available CreateGroup() options.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#new-group

type CreateGroupVariableOptions added in v0.39.1

type CreateGroupVariableOptions struct {
	Key          *string            `url:"key,omitempty" json:"key,omitempty"`
	Value        *string            `url:"value,omitempty" json:"value,omitempty"`
	VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"`
	Protected    *bool              `url:"protected,omitempty" json:"protected,omitempty"`
	Masked       *bool              `url:"masked,omitempty" json:"masked,omitempty"`
}

CreateGroupVariableOptions represents the available CreateVariable() options.

GitLab API docs: https://docs.gitlab.com/ee/api/group_level_variables.html#create-variable

type CreateImpersonationTokenOptions added in v0.6.0

type CreateImpersonationTokenOptions struct {
	Name      *string    `url:"name,omitempty" json:"name,omitempty"`
	Scopes    *[]string  `url:"scopes,omitempty" json:"scopes,omitempty"`
	ExpiresAt *time.Time `url:"expires_at,omitempty" json:"expires_at,omitempty"`
}

CreateImpersonationTokenOptions represents the available CreateImpersonationToken() options.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#create-an-impersonation-token

type CreateInstanceVariableOptions added in v0.39.1

type CreateInstanceVariableOptions struct {
	Key          *string            `url:"key,omitempty" json:"key,omitempty"`
	Value        *string            `url:"value,omitempty" json:"value,omitempty"`
	VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"`
	Protected    *bool              `url:"protected,omitempty" json:"protected,omitempty"`
	Masked       *bool              `url:"masked,omitempty" json:"masked,omitempty"`
}

CreateInstanceVariableOptions represents the available CreateVariable() options.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_level_ci_variables.html#create-instance-variable

type CreateIssueBoardListOptions added in v0.8.0

type CreateIssueBoardListOptions struct {
	LabelID *int `url:"label_id" json:"label_id"`
}

CreateIssueBoardListOptions represents the available CreateIssueBoardList() options.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#new-board-list

type CreateIssueBoardOptions added in v0.39.1

type CreateIssueBoardOptions struct {
	Name *string `url:"name" json:"name"`
}

CreateIssueBoardOptions represents the available CreateIssueBoard() options.

GitLab API docs: https://docs.gitlab.com/ee/api/boards.html#create-a-board-starter

type CreateIssueDiscussionOptions added in v0.11.2

type CreateIssueDiscussionOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

CreateIssueDiscussionOptions represents the available CreateIssueDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#create-new-issue-thread

type CreateIssueLinkOptions added in v0.8.0

type CreateIssueLinkOptions struct {
	TargetProjectID *string `json:"target_project_id"`
	TargetIssueIID  *string `json:"target_issue_iid"`
}

CreateIssueLinkOptions represents the available CreateIssueLink() options.

GitLab API docs: https://docs.gitlab.com/ee/api/issue_links.html

type CreateIssueNoteOptions

type CreateIssueNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

CreateIssueNoteOptions represents the available CreateIssueNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#create-new-issue-note

type CreateIssueOptions

type CreateIssueOptions struct {
	IID                                *int       `url:"iid,omitempty" json:"iid,omitempty"`
	Title                              *string    `url:"title,omitempty" json:"title,omitempty"`
	Description                        *string    `url:"description,omitempty" json:"description,omitempty"`
	Confidential                       *bool      `url:"confidential,omitempty" json:"confidential,omitempty"`
	AssigneeIDs                        []int      `url:"assignee_ids,omitempty" json:"assignee_ids,omitempty"`
	MilestoneID                        *int       `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
	Labels                             Labels     `url:"labels,comma,omitempty" json:"labels,omitempty"`
	CreatedAt                          *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
	DueDate                            *ISOTime   `url:"due_date,omitempty" json:"due_date,omitempty"`
	MergeRequestToResolveDiscussionsOf *int       `url:"merge_request_to_resolve_discussions_of,omitempty" json:"merge_request_to_resolve_discussions_of,omitempty"`
	DiscussionToResolve                *string    `url:"discussion_to_resolve,omitempty" json:"discussion_to_resolve,omitempty"`
	Weight                             *int       `url:"weight,omitempty" json:"weight,omitempty"`
}

CreateIssueOptions represents the available CreateIssue() options.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues

type CreateLabelOptions

type CreateLabelOptions struct {
	Name        *string `url:"name,omitempty" json:"name,omitempty"`
	Color       *string `url:"color,omitempty" json:"color,omitempty"`
	Description *string `url:"description,omitempty" json:"description,omitempty"`
}

CreateLabelOptions represents the available CreateLabel() options.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#create-a-new-label

type CreateMergeRequestApprovalRuleOptions added in v0.39.1

type CreateMergeRequestApprovalRuleOptions struct {
	Name                  *string `url:"name,omitempty" json:"name,omitempty"`
	ApprovalsRequired     *int    `url:"approvals_required,omitempty" json:"approvals_required,omitempty"`
	ApprovalProjectRuleID *int    `url:"approval_project_rule_id,omitempty" json:"approval_project_rule_id,omitempty"`
	UserIDs               []int   `url:"user_ids,omitempty" json:"user_ids,omitempty"`
	GroupIDs              []int   `url:"group_ids,omitempty" json:"group_ids,omitempty"`
}

CreateMergeRequestApprovalRuleOptions represents the available CreateApprovalRule() options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-merge-request-level-rule

type CreateMergeRequestDiscussionOptions added in v0.11.2

type CreateMergeRequestDiscussionOptions struct {
	Body      *string       `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time    `url:"created_at,omitempty" json:"created_at,omitempty"`
	Position  *NotePosition `url:"position,omitempty" json:"position,omitempty"`
}

CreateMergeRequestDiscussionOptions represents the available CreateMergeRequestDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#create-new-merge-request-thread

type CreateMergeRequestNoteOptions

type CreateMergeRequestNoteOptions struct {
	Body *string `url:"body,omitempty" json:"body,omitempty"`
}

CreateMergeRequestNoteOptions represents the available CreateMergeRequestNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#create-new-merge-request-note

type CreateMergeRequestOptions

type CreateMergeRequestOptions struct {
	Title              *string `url:"title,omitempty" json:"title,omitempty"`
	Description        *string `url:"description,omitempty" json:"description,omitempty"`
	SourceBranch       *string `url:"source_branch,omitempty" json:"source_branch,omitempty"`
	TargetBranch       *string `url:"target_branch,omitempty" json:"target_branch,omitempty"`
	Labels             Labels  `url:"labels,comma,omitempty" json:"labels,omitempty"`
	AssigneeID         *int    `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	AssigneeIDs        []int   `url:"assignee_ids,omitempty" json:"assignee_ids,omitempty"`
	TargetProjectID    *int    `url:"target_project_id,omitempty" json:"target_project_id,omitempty"`
	MilestoneID        *int    `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
	RemoveSourceBranch *bool   `url:"remove_source_branch,omitempty" json:"remove_source_branch,omitempty"`
	Squash             *bool   `url:"squash,omitempty" json:"squash,omitempty"`
	AllowCollaboration *bool   `url:"allow_collaboration,omitempty" json:"allow_collaboration,omitempty"`
}

CreateMergeRequestOptions represents the available CreateMergeRequest() options.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#create-mr

type CreateMilestoneOptions

type CreateMilestoneOptions struct {
	Title       *string  `url:"title,omitempty" json:"title,omitempty"`
	Description *string  `url:"description,omitempty" json:"description,omitempty"`
	StartDate   *ISOTime `url:"start_date,omitempty" json:"start_date,omitempty"`
	DueDate     *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"`
}

CreateMilestoneOptions represents the available CreateMilestone() options.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#create-new-milestone

type CreatePagesDomainOptions added in v0.8.0

type CreatePagesDomainOptions struct {
	Domain         *string `url:"domain,omitempty" json:"domain,omitempty"`
	AutoSslEnabled *bool   `url:"auto_ssl_enabled,omitempty" json:"auto_ssl_enabled,omitempty"`
	Certificate    *string `url:"certifiate,omitempty" json:"certifiate,omitempty"`
	Key            *string `url:"key,omitempty" json:"key,omitempty"`
}

CreatePagesDomainOptions represents the available CreatePagesDomain() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html#create-new-pages-domain

type CreatePipelineOptions added in v0.4.0

type CreatePipelineOptions struct {
	Ref       *string             `url:"ref" json:"ref"`
	Variables []*PipelineVariable `url:"variables,omitempty" json:"variables,omitempty"`
}

CreatePipelineOptions represents the available CreatePipeline() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#create-a-new-pipeline

type CreatePipelineScheduleOptions added in v0.9.0

type CreatePipelineScheduleOptions struct {
	Description  *string `url:"description" json:"description"`
	Ref          *string `url:"ref" json:"ref"`
	Cron         *string `url:"cron" json:"cron"`
	CronTimezone *string `url:"cron_timezone,omitempty" json:"cron_timezone,omitempty"`
	Active       *bool   `url:"active,omitempty" json:"active,omitempty"`
}

CreatePipelineScheduleOptions represents the available CreatePipelineSchedule() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#create-a-new-pipeline-schedule

type CreatePipelineScheduleVariableOptions added in v0.9.0

type CreatePipelineScheduleVariableOptions struct {
	Key          *string `url:"key" json:"key"`
	Value        *string `url:"value" json:"value"`
	VariableType *string `url:"variable_type,omitempty" json:"variable_type,omitempty"`
}

CreatePipelineScheduleVariableOptions represents the available CreatePipelineScheduleVariable() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#create-a-new-pipeline-schedule

type CreateProjectDeployTokenOptions added in v0.39.1

type CreateProjectDeployTokenOptions struct {
	Name      *string    `url:"name,omitempty" json:"name,omitempty"`
	ExpiresAt *time.Time `url:"expires_at,omitempty" json:"expires_at,omitempty"`
	Username  *string    `url:"username,omitempty" json:"username,omitempty"`
	Scopes    []string   `url:"scopes,omitempty" json:"scopes,omitempty"`
}

CreateProjectDeployTokenOptions represents the available CreateProjectDeployToken() options.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#create-a-project-deploy-token

type CreateProjectDeploymentOptions added in v0.39.1

type CreateProjectDeploymentOptions struct {
	Environment *string                `url:"environment,omitempty" json:"environment,omitempty"`
	Ref         *string                `url:"ref,omitempty" json:"ref,omitempty"`
	SHA         *string                `url:"sha,omitempty" json:"sha,omitempty"`
	Tag         *bool                  `url:"tag,omitempty" json:"tag,omitempty"`
	Status      *DeploymentStatusValue `url:"status,omitempty" json:"status,omitempty"`
}

CreateProjectDeploymentOptions represents the available CreateProjectDeployment() options.

GitLab API docs: https://docs.gitlab.com/ee/api/deployments.html#create-a-deployment

type CreateProjectForUserOptions

type CreateProjectForUserOptions CreateProjectOptions

CreateProjectForUserOptions represents the available CreateProjectForUser() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#create-project-for-user

type CreateProjectLevelRuleOptions added in v0.39.1

type CreateProjectLevelRuleOptions struct {
	Name               *string `url:"name,omitempty" json:"name,omitempty"`
	ApprovalsRequired  *int    `url:"approvals_required,omitempty" json:"approvals_required,omitempty"`
	UserIDs            []int   `url:"user_ids,omitempty" json:"user_ids,omitempty"`
	GroupIDs           []int   `url:"group_ids,omitempty" json:"group_ids,omitempty"`
	ProtectedBranchIDs []int   `url:"protected_branch_ids,omitempty" json:"protected_branch_ids,omitempty"`
}

CreateProjectLevelRuleOptions represents the available CreateProjectApprovalRule() options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rules

type CreateProjectOptions

type CreateProjectOptions struct {
	Name                                      *string             `url:"name,omitempty" json:"name,omitempty"`
	Path                                      *string             `url:"path,omitempty" json:"path,omitempty"`
	NamespaceID                               *int                `url:"namespace_id,omitempty" json:"namespace_id,omitempty"`
	DefaultBranch                             *string             `url:"default_branch,omitempty" json:"default_branch,omitempty"`
	Description                               *string             `url:"description,omitempty" json:"description,omitempty"`
	IssuesAccessLevel                         *AccessControlValue `url:"issues_access_level,omitempty" json:"issues_access_level,omitempty"`
	RepositoryAccessLevel                     *AccessControlValue `url:"repository_access_level,omitempty" json:"repository_access_level,omitempty"`
	MergeRequestsAccessLevel                  *AccessControlValue `url:"merge_requests_access_level,omitempty" json:"merge_requests_access_level,omitempty"`
	ForkingAccessLevel                        *AccessControlValue `url:"forking_access_level,omitempty" json:"forking_access_level,omitempty"`
	BuildsAccessLevel                         *AccessControlValue `url:"builds_access_level,omitempty" json:"builds_access_level,omitempty"`
	WikiAccessLevel                           *AccessControlValue `url:"wiki_access_level,omitempty" json:"wiki_access_level,omitempty"`
	SnippetsAccessLevel                       *AccessControlValue `url:"snippets_access_level,omitempty" json:"snippets_access_level,omitempty"`
	PagesAccessLevel                          *AccessControlValue `url:"pages_access_level,omitempty" json:"pages_access_level,omitempty"`
	EmailsDisabled                            *bool               `url:"emails_disabled,omitempty" json:"emails_disabled,omitempty"`
	ResolveOutdatedDiffDiscussions            *bool               `url:"resolve_outdated_diff_discussions,omitempty" json:"resolve_outdated_diff_discussions,omitempty"`
	ContainerRegistryEnabled                  *bool               `url:"container_registry_enabled,omitempty" json:"container_registry_enabled,omitempty"`
	SharedRunnersEnabled                      *bool               `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
	Visibility                                *VisibilityValue    `url:"visibility,omitempty" json:"visibility,omitempty"`
	ImportURL                                 *string             `url:"import_url,omitempty" json:"import_url,omitempty"`
	PublicBuilds                              *bool               `url:"public_builds,omitempty" json:"public_builds,omitempty"`
	OnlyAllowMergeIfPipelineSucceeds          *bool               `url:"only_allow_merge_if_pipeline_succeeds,omitempty" json:"only_allow_merge_if_pipeline_succeeds,omitempty"`
	OnlyAllowMergeIfAllDiscussionsAreResolved *bool               `` /* 130-byte string literal not displayed */
	MergeMethod                               *MergeMethodValue   `url:"merge_method,omitempty" json:"merge_method,omitempty"`
	RemoveSourceBranchAfterMerge              *bool               `url:"remove_source_branch_after_merge,omitempty" json:"remove_source_branch_after_merge,omitempty"`
	LFSEnabled                                *bool               `url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"`
	RequestAccessEnabled                      *bool               `url:"request_access_enabled,omitempty" json:"request_access_enabled,omitempty"`
	TagList                                   *[]string           `url:"tag_list,omitempty" json:"tag_list,omitempty"`
	PrintingMergeRequestLinkEnabled           *bool               `url:"printing_merge_request_link_enabled,omitempty" json:"printing_merge_request_link_enabled,omitempty"`
	BuildGitStrategy                          *string             `url:"build_git_strategy,omitempty" json:"build_git_strategy,omitempty"`
	BuildTimeout                              *int                `url:"build_timeout,omitempty" json:"build_timeout,omitempty"`
	AutoCancelPendingPipelines                *string             `url:"auto_cancel_pending_pipelines,omitempty" json:"auto_cancel_pending_pipelines,omitempty"`
	BuildCoverageRegex                        *string             `url:"build_coverage_regex,omitempty" json:"build_coverage_regex,omitempty"`
	CIConfigPath                              *string             `url:"ci_config_path,omitempty" json:"ci_config_path,omitempty"`
	AutoDevopsEnabled                         *bool               `url:"auto_devops_enabled,omitempty" json:"auto_devops_enabled,omitempty"`
	AutoDevopsDeployStrategy                  *string             `url:"auto_devops_deploy_strategy,omitempty" json:"auto_devops_deploy_strategy,omitempty"`
	ApprovalsBeforeMerge                      *int                `url:"approvals_before_merge,omitempty" json:"approvals_before_merge,omitempty"`
	ExternalAuthorizationClassificationLabel  *string             `url:"external_authorization_classification_label,omitempty" json:"external_authorization_classification_label,omitempty"`
	Mirror                                    *bool               `url:"mirror,omitempty" json:"mirror,omitempty"`
	MirrorTriggerBuilds                       *bool               `url:"mirror_trigger_builds,omitempty" json:"mirror_trigger_builds,omitempty"`
	InitializeWithReadme                      *bool               `url:"initialize_with_readme,omitempty" json:"initialize_with_readme,omitempty"`
	TemplateName                              *string             `url:"template_name,omitempty" json:"template_name,omitempty"`
	TemplateProjectID                         *int                `url:"template_project_id,omitempty" json:"template_project_id,omitempty"`
	UseCustomTemplate                         *bool               `url:"use_custom_template,omitempty" json:"use_custom_template,omitempty"`
	GroupWithProjectTemplatesID               *int                `url:"group_with_project_templates_id,omitempty" json:"group_with_project_templates_id,omitempty"`
	PackagesEnabled                           *bool               `url:"packages_enabled,omitempty" json:"packages_enabled,omitempty"`
	ServiceDeskEnabled                        *bool               `url:"service_desk_enabled,omitempty" json:"service_desk_enabled,omitempty"`
	AutocloseReferencedIssues                 *bool               `url:"autoclose_referenced_issues,omitempty" json:"autoclose_referenced_issues,omitempty"`

	// Deprecated members
	IssuesEnabled        *bool `url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"`
	MergeRequestsEnabled *bool `url:"merge_requests_enabled,omitempty" json:"merge_requests_enabled,omitempty"`
	JobsEnabled          *bool `url:"jobs_enabled,omitempty" json:"jobs_enabled,omitempty"`
	WikiEnabled          *bool `url:"wiki_enabled,omitempty" json:"wiki_enabled,omitempty"`
	SnippetsEnabled      *bool `url:"snippets_enabled,omitempty" json:"snippets_enabled,omitempty"`
}

CreateProjectOptions represents the available CreateProject() options.

GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#create-project

type CreateProjectSnippetOptions added in v0.7.2

type CreateProjectSnippetOptions struct {
	Title       *string          `url:"title,omitempty" json:"title,omitempty"`
	FileName    *string          `url:"file_name,omitempty" json:"file_name,omitempty"`
	Description *string          `url:"description,omitempty" json:"description,omitempty"`
	Content     *string          `url:"content,omitempty" json:"content,omitempty"`
	Visibility  *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"`
}

CreateProjectSnippetOptions represents the available CreateSnippet() options.

GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#create-new-snippet

type CreateProjectVariableOptions added in v0.39.1

type CreateProjectVariableOptions struct {
	Key              *string            `url:"key,omitempty" json:"key,omitempty"`
	Value            *string            `url:"value,omitempty" json:"value,omitempty"`
	VariableType     *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"`
	Protected        *bool              `url:"protected,omitempty" json:"protected,omitempty"`
	Masked           *bool              `url:"masked,omitempty" json:"masked,omitempty"`
	EnvironmentScope *string            `url:"environment_scope,omitempty" json:"environment_scope,omitempty"`
}

CreateProjectVariableOptions represents the available CreateVariable() options.

GitLab API docs: https://docs.gitlab.com/ee/api/project_level_variables.html#create-variable

type CreateReleaseLinkOptions added in v0.39.1

type CreateReleaseLinkOptions struct {
	Name *string `url:"name" json:"name"`
	URL  *string `url:"url" json:"url"`
}

CreateReleaseLinkOptions represents CreateReleaseLink() options.

GitLab API docs: https://docs.gitlab.com/ee/api/releases/links.html#create-a-link

type CreateReleaseNoteOptions deprecated added in v0.39.1

type CreateReleaseNoteOptions struct {
	Description *string `url:"description:omitempty" json:"description,omitempty"`
}

CreateReleaseNoteOptions represents the available CreateReleaseNote() options.

Deprecated: This feature was deprecated in GitLab 11.7.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html#create-a-new-release

type CreateReleaseOptions added in v0.10.0

type CreateReleaseOptions struct {
	Name        *string        `url:"name" json:"name"`
	TagName     *string        `url:"tag_name" json:"tag_name"`
	Description *string        `url:"description" json:"description"`
	Ref         *string        `url:"ref,omitempty" json:"ref,omitempty"`
	Assets      *ReleaseAssets `url:"assets,omitempty" json:"assets,omitempty"`
}

CreateReleaseOptions represents CreateRelease() options.

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#create-a-release

type CreateSnippetDiscussionOptions added in v0.11.2

type CreateSnippetDiscussionOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

CreateSnippetDiscussionOptions represents the available CreateSnippetDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#create-new-snippet-thread

type CreateSnippetNoteOptions

type CreateSnippetNoteOptions struct {
	Body *string `url:"body,omitempty" json:"body,omitempty"`
}

CreateSnippetNoteOptions represents the available CreateSnippetNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#create-new-snippet-note

type CreateSnippetOptions

type CreateSnippetOptions struct {
	Title       *string          `url:"title,omitempty" json:"title,omitempty"`
	FileName    *string          `url:"file_name,omitempty" json:"file_name,omitempty"`
	Description *string          `url:"description,omitempty" json:"description,omitempty"`
	Content     *string          `url:"content,omitempty" json:"content,omitempty"`
	Visibility  *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"`
}

CreateSnippetOptions represents the available CreateSnippet() options.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#create-new-snippet

type CreateTagOptions

type CreateTagOptions struct {
	TagName *string `url:"tag_name,omitempty" json:"tag_name,omitempty"`
	Ref     *string `url:"ref,omitempty" json:"ref,omitempty"`
	Message *string `url:"message,omitempty" json:"message,omitempty"`
	// ReleaseDescription parameter was deprecated in GitLab 11.7
	ReleaseDescription *string `url:"release_description:omitempty" json:"release_description,omitempty"`
}

CreateTagOptions represents the available CreateTag() options.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html#create-a-new-tag

type CreateUserOptions

type CreateUserOptions struct {
	Email               *string `url:"email,omitempty" json:"email,omitempty"`
	Password            *string `url:"password,omitempty" json:"password,omitempty"`
	ResetPassword       *bool   `url:"reset_password,omitempty" json:"reset_password,omitempty"`
	ForceRandomPassword *bool   `url:"force_random_password,omitempty" json:"force_random_password,omitempty"`
	Username            *string `url:"username,omitempty" json:"username,omitempty"`
	Name                *string `url:"name,omitempty" json:"name,omitempty"`
	Skype               *string `url:"skype,omitempty" json:"skype,omitempty"`
	Linkedin            *string `url:"linkedin,omitempty" json:"linkedin,omitempty"`
	Twitter             *string `url:"twitter,omitempty" json:"twitter,omitempty"`
	WebsiteURL          *string `url:"website_url,omitempty" json:"website_url,omitempty"`
	Organization        *string `url:"organization,omitempty" json:"organization,omitempty"`
	ProjectsLimit       *int    `url:"projects_limit,omitempty" json:"projects_limit,omitempty"`
	ExternUID           *string `url:"extern_uid,omitempty" json:"extern_uid,omitempty"`
	Provider            *string `url:"provider,omitempty" json:"provider,omitempty"`
	Bio                 *string `url:"bio,omitempty" json:"bio,omitempty"`
	Location            *string `url:"location,omitempty" json:"location,omitempty"`
	Admin               *bool   `url:"admin,omitempty" json:"admin,omitempty"`
	CanCreateGroup      *bool   `url:"can_create_group,omitempty" json:"can_create_group,omitempty"`
	SkipConfirmation    *bool   `url:"skip_confirmation,omitempty" json:"skip_confirmation,omitempty"`
	External            *bool   `url:"external,omitempty" json:"external,omitempty"`
	PrivateProfile      *bool   `url:"private_profile,omitempty" json:"private_profile,omitempty"`
}

CreateUserOptions represents the available CreateUser() options.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-creation

type CreateWikiPageOptions added in v0.7.0

type CreateWikiPageOptions struct {
	Content *string `url:"content" json:"content"`
	Title   *string `url:"title" json:"title"`
	Format  *string `url:"format,omitempty" json:"format,omitempty"`
}

CreateWikiPageOptions represents options to CreateWikiPage.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html#create-a-new-wiki-page

type CustomAttribute added in v0.11.1

type CustomAttribute struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

CustomAttribute struct is used to unmarshal response to api calls.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html

type CustomAttributesService added in v0.11.1

type CustomAttributesService struct {
	// contains filtered or unexported fields
}

CustomAttributesService handles communication with the group, project and user custom attributes related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html

func (*CustomAttributesService) DeleteCustomGroupAttribute added in v0.11.1

func (s *CustomAttributesService) DeleteCustomGroupAttribute(group int, key string, options ...RequestOptionFunc) (*Response, error)

DeleteCustomGroupAttribute removes the custom attribute of the specified group.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#delete-custom-attribute

func (*CustomAttributesService) DeleteCustomProjectAttribute added in v0.11.1

func (s *CustomAttributesService) DeleteCustomProjectAttribute(project int, key string, options ...RequestOptionFunc) (*Response, error)

DeleteCustomProjectAttribute removes the custom attribute of the specified project.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#delete-custom-attribute

func (*CustomAttributesService) DeleteCustomUserAttribute added in v0.11.1

func (s *CustomAttributesService) DeleteCustomUserAttribute(user int, key string, options ...RequestOptionFunc) (*Response, error)

DeleteCustomUserAttribute removes the custom attribute of the specified user.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#delete-custom-attribute

func (*CustomAttributesService) GetCustomGroupAttribute added in v0.11.1

func (s *CustomAttributesService) GetCustomGroupAttribute(group int, key string, options ...RequestOptionFunc) (*CustomAttribute, *Response, error)

GetCustomGroupAttribute returns the group attribute with a speciifc key.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#single-custom-attribute

func (*CustomAttributesService) GetCustomProjectAttribute added in v0.11.1

func (s *CustomAttributesService) GetCustomProjectAttribute(project int, key string, options ...RequestOptionFunc) (*CustomAttribute, *Response, error)

GetCustomProjectAttribute returns the project attribute with a speciifc key.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#single-custom-attribute

func (*CustomAttributesService) GetCustomUserAttribute added in v0.11.1

func (s *CustomAttributesService) GetCustomUserAttribute(user int, key string, options ...RequestOptionFunc) (*CustomAttribute, *Response, error)

GetCustomUserAttribute returns the user attribute with a speciifc key.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#single-custom-attribute

func (*CustomAttributesService) ListCustomGroupAttributes added in v0.11.1

func (s *CustomAttributesService) ListCustomGroupAttributes(group int, options ...RequestOptionFunc) ([]*CustomAttribute, *Response, error)

ListCustomGroupAttributes lists the custom attributes of the specified group.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#list-custom-attributes

func (*CustomAttributesService) ListCustomProjectAttributes added in v0.11.1

func (s *CustomAttributesService) ListCustomProjectAttributes(project int, options ...RequestOptionFunc) ([]*CustomAttribute, *Response, error)

ListCustomProjectAttributes lists the custom attributes of the specified project.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#list-custom-attributes

func (*CustomAttributesService) ListCustomUserAttributes added in v0.11.1

func (s *CustomAttributesService) ListCustomUserAttributes(user int, options ...RequestOptionFunc) ([]*CustomAttribute, *Response, error)

ListCustomUserAttributes lists the custom attributes of the specified user.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#list-custom-attributes

func (*CustomAttributesService) SetCustomGroupAttribute added in v0.11.1

func (s *CustomAttributesService) SetCustomGroupAttribute(group int, c CustomAttribute, options ...RequestOptionFunc) (*CustomAttribute, *Response, error)

SetCustomGroupAttribute sets the custom attributes of the specified group.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#set-custom-attribute

func (*CustomAttributesService) SetCustomProjectAttribute added in v0.11.1

func (s *CustomAttributesService) SetCustomProjectAttribute(project int, c CustomAttribute, options ...RequestOptionFunc) (*CustomAttribute, *Response, error)

SetCustomProjectAttribute sets the custom attributes of the specified project.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#set-custom-attribute

func (*CustomAttributesService) SetCustomUserAttribute added in v0.11.1

func (s *CustomAttributesService) SetCustomUserAttribute(user int, c CustomAttribute, options ...RequestOptionFunc) (*CustomAttribute, *Response, error)

SetCustomUserAttribute sets the custom attributes of the specified user.

GitLab API docs: https://docs.gitlab.com/ce/api/custom_attributes.html#set-custom-attribute

type CustomIssueTrackerService added in v0.39.1

type CustomIssueTrackerService struct {
	Service
	Properties *CustomIssueTrackerServiceProperties `json:"properties"`
}

CustomIssueTrackerService represents Custom Issue Tracker service settings.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#custom-issue-tracker

type CustomIssueTrackerServiceProperties added in v0.39.1

type CustomIssueTrackerServiceProperties struct {
	ProjectURL  string `json:"project_url,omitempty"`
	IssuesURL   string `json:"issues_url,omitempty"`
	NewIssueURL string `json:"new_issue_url,omitempty"`
}

CustomIssueTrackerServiceProperties represents Custom Issue Tracker specific properties.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#custom-issue-tracker

type DeleteFileOptions

type DeleteFileOptions struct {
	Branch        *string `url:"branch,omitempty" json:"branch,omitempty"`
	StartBranch   *string `url:"start_branch,omitempty" json:"start_branch,omitempty"`
	AuthorEmail   *string `url:"author_email,omitempty" json:"author_email,omitempty"`
	AuthorName    *string `url:"author_name,omitempty" json:"author_name,omitempty"`
	CommitMessage *string `url:"commit_message,omitempty" json:"commit_message,omitempty"`
	LastCommitID  *string `url:"last_commit_id,omitempty" json:"last_commit_id,omitempty"`
}

DeleteFileOptions represents the available DeleteFile() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository

type DeleteGroupLabelOptions added in v0.39.1

type DeleteGroupLabelOptions DeleteLabelOptions

DeleteGroupLabelOptions represents the available DeleteGroupLabel() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html#delete-a-group-label

type DeleteLabelOptions

type DeleteLabelOptions struct {
	Name *string `url:"name,omitempty" json:"name,omitempty"`
}

DeleteLabelOptions represents the available DeleteLabel() options.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label

type DeleteRegisteredRunnerOptions added in v0.11.0

type DeleteRegisteredRunnerOptions struct {
	Token *string `url:"token" json:"token"`
}

DeleteRegisteredRunnerOptions represents the available DeleteRegisteredRunner() options.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#delete-a-registered-runner

type DeleteRegistryRepositoryTagsOptions added in v0.39.1

type DeleteRegistryRepositoryTagsOptions struct {
	NameRegexpDelete *string `url:"name_regex_delete,omitempty" json:"name_regex_delete,omitempty"`
	NameRegexpKeep   *string `url:"name_regex_keep,omitempty" json:"name_regex_keep,omitempty"`
	KeepN            *int    `url:"keep_n,omitempty" json:"keep_n,omitempty"`
	OlderThan        *string `url:"older_than,omitempty" json:"older_than,omitempty"`

	// Deprecated members
	NameRegexp *string `url:"name_regex,omitempty" json:"name_regex,omitempty"`
}

DeleteRegistryRepositoryTagsOptions represents the available DeleteRegistryRepositoryTags() options.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html#delete-repository-tags-in-bulk

type DeployKey

type DeployKey struct {
	ID        int        `json:"id"`
	Title     string     `json:"title"`
	Key       string     `json:"key"`
	CanPush   *bool      `json:"can_push"`
	CreatedAt *time.Time `json:"created_at"`
}

DeployKey represents a GitLab deploy key.

func (DeployKey) String

func (k DeployKey) String() string

type DeployKeysService

type DeployKeysService struct {
	// contains filtered or unexported fields
}

DeployKeysService handles communication with the keys related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html

func (*DeployKeysService) AddDeployKey

func (s *DeployKeysService) AddDeployKey(pid interface{}, opt *AddDeployKeyOptions, options ...RequestOptionFunc) (*DeployKey, *Response, error)

AddDeployKey creates a new deploy key for a project. If deploy key already exists in another project - it will be joined to project but only if original one was is accessible by same user.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html#add-deploy-key

func (*DeployKeysService) DeleteDeployKey

func (s *DeployKeysService) DeleteDeployKey(pid interface{}, deployKey int, options ...RequestOptionFunc) (*Response, error)

DeleteDeployKey deletes a deploy key from a project.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html#delete-deploy-key

func (*DeployKeysService) EnableDeployKey added in v0.6.0

func (s *DeployKeysService) EnableDeployKey(pid interface{}, deployKey int, options ...RequestOptionFunc) (*DeployKey, *Response, error)

EnableDeployKey enables a deploy key.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html#enable-deploy-key

func (*DeployKeysService) GetDeployKey

func (s *DeployKeysService) GetDeployKey(pid interface{}, deployKey int, options ...RequestOptionFunc) (*DeployKey, *Response, error)

GetDeployKey gets a single deploy key.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html#single-deploy-key

func (*DeployKeysService) ListAllDeployKeys added in v0.6.0

func (s *DeployKeysService) ListAllDeployKeys(options ...RequestOptionFunc) ([]*DeployKey, *Response, error)

ListAllDeployKeys gets a list of all deploy keys

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html#list-all-deploy-keys

func (*DeployKeysService) ListProjectDeployKeys added in v0.6.0

func (s *DeployKeysService) ListProjectDeployKeys(pid interface{}, opt *ListProjectDeployKeysOptions, options ...RequestOptionFunc) ([]*DeployKey, *Response, error)

ListProjectDeployKeys gets a list of a project's deploy keys

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html#list-project-deploy-keys

func (*DeployKeysService) UpdateDeployKey added in v0.39.1

func (s *DeployKeysService) UpdateDeployKey(pid interface{}, deployKey int, opt *UpdateDeployKeyOptions, options ...RequestOptionFunc) (*DeployKey, *Response, error)

UpdateDeployKey updates a deploy key for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html#update-deploy-key

type DeployToken added in v0.39.1

type DeployToken struct {
	ID        int        `json:"id"`
	Name      string     `json:"name"`
	Username  string     `json:"username"`
	ExpiresAt *time.Time `json:"expires_at"`
	Token     string     `json:"token,omitempty"`
	Scopes    []string   `json:"scopes"`
}

DeployToken represents a GitLab deploy token.

func (DeployToken) String added in v0.39.1

func (k DeployToken) String() string

type DeployTokensService added in v0.39.1

type DeployTokensService struct {
	// contains filtered or unexported fields
}

DeployTokensService handles communication with the deploy tokens related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html

func (*DeployTokensService) CreateGroupDeployToken added in v0.39.1

func (s *DeployTokensService) CreateGroupDeployToken(gid interface{}, opt *CreateGroupDeployTokenOptions, options ...RequestOptionFunc) (*DeployToken, *Response, error)

CreateGroupDeployToken creates a new deploy token for a group.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#create-a-group-deploy-token

func (*DeployTokensService) CreateProjectDeployToken added in v0.39.1

func (s *DeployTokensService) CreateProjectDeployToken(pid interface{}, opt *CreateProjectDeployTokenOptions, options ...RequestOptionFunc) (*DeployToken, *Response, error)

CreateProjectDeployToken creates a new deploy token for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#create-a-project-deploy-token

func (*DeployTokensService) DeleteGroupDeployToken added in v0.39.1

func (s *DeployTokensService) DeleteGroupDeployToken(gid interface{}, deployToken int, options ...RequestOptionFunc) (*Response, error)

DeleteGroupDeployToken removes a deploy token from the group.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#delete-a-group-deploy-token

func (*DeployTokensService) DeleteProjectDeployToken added in v0.39.1

func (s *DeployTokensService) DeleteProjectDeployToken(pid interface{}, deployToken int, options ...RequestOptionFunc) (*Response, error)

DeleteProjectDeployToken removes a deploy token from the project.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#delete-a-project-deploy-token

func (*DeployTokensService) ListAllDeployTokens added in v0.39.1

func (s *DeployTokensService) ListAllDeployTokens(options ...RequestOptionFunc) ([]*DeployToken, *Response, error)

ListAllDeployTokens gets a list of all deploy tokens.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#list-all-deploy-tokens

func (*DeployTokensService) ListGroupDeployTokens added in v0.39.1

func (s *DeployTokensService) ListGroupDeployTokens(gid interface{}, opt *ListGroupDeployTokensOptions, options ...RequestOptionFunc) ([]*DeployToken, *Response, error)

ListGroupDeployTokens gets a list of a group’s deploy tokens.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#list-project-deploy-tokens

func (*DeployTokensService) ListProjectDeployTokens added in v0.39.1

func (s *DeployTokensService) ListProjectDeployTokens(pid interface{}, opt *ListProjectDeployTokensOptions, options ...RequestOptionFunc) ([]*DeployToken, *Response, error)

ListProjectDeployTokens gets a list of a project's deploy tokens.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#list-project-deploy-tokens

type Deployment added in v0.8.1

type Deployment struct {
	ID          int          `json:"id"`
	IID         int          `json:"iid"`
	Ref         string       `json:"ref"`
	SHA         string       `json:"sha"`
	CreatedAt   *time.Time   `json:"created_at"`
	UpdatedAt   *time.Time   `json:"updated_at"`
	User        *ProjectUser `json:"user"`
	Environment *Environment `json:"environment"`
	Deployable  struct {
		ID         int        `json:"id"`
		Status     string     `json:"status"`
		Stage      string     `json:"stage"`
		Name       string     `json:"name"`
		Ref        string     `json:"ref"`
		Tag        bool       `json:"tag"`
		Coverage   float64    `json:"coverage"`
		CreatedAt  *time.Time `json:"created_at"`
		StartedAt  *time.Time `json:"started_at"`
		FinishedAt *time.Time `json:"finished_at"`
		Duration   float64    `json:"duration"`
		User       *User      `json:"user"`
		Commit     *Commit    `json:"commit"`
		Pipeline   struct {
			ID     int    `json:"id"`
			SHA    string `json:"sha"`
			Ref    string `json:"ref"`
			Status string `json:"status"`
		} `json:"pipeline"`
		Runner *Runner `json:"runner"`
	} `json:"deployable"`
}

Deployment represents the Gitlab deployment

type DeploymentStatusValue added in v0.39.1

type DeploymentStatusValue string

DeploymentStatusValue represents a Gitlab deployment status.

const (
	DeploymentStatusCreated  DeploymentStatusValue = "created"
	DeploymentStatusRunning  DeploymentStatusValue = "running"
	DeploymentStatusSuccess  DeploymentStatusValue = "success"
	DeploymentStatusFailed   DeploymentStatusValue = "failed"
	DeploymentStatusCanceled DeploymentStatusValue = "canceled"
)

These constants represent all valid deployment statuses.

func DeploymentStatus added in v0.39.1

func DeploymentStatus(v DeploymentStatusValue) *DeploymentStatusValue

DeploymentStatus is a helper routine that allocates a new DeploymentStatusValue to store v and returns a pointer to it.

type DeploymentsService added in v0.8.1

type DeploymentsService struct {
	// contains filtered or unexported fields
}

DeploymentsService handles communication with the deployment related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/deployments.html

func (*DeploymentsService) CreateProjectDeployment added in v0.39.1

func (s *DeploymentsService) CreateProjectDeployment(pid interface{}, opt *CreateProjectDeploymentOptions, options ...RequestOptionFunc) (*Deployment, *Response, error)

CreateProjectDeployment creates a project deployment.

GitLab API docs: https://docs.gitlab.com/ee/api/deployments.html#create-a-deployment

func (*DeploymentsService) GetProjectDeployment added in v0.8.1

func (s *DeploymentsService) GetProjectDeployment(pid interface{}, deployment int, options ...RequestOptionFunc) (*Deployment, *Response, error)

GetProjectDeployment get a deployment for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/deployments.html#get-a-specific-deployment

func (*DeploymentsService) ListProjectDeployments added in v0.8.1

func (s *DeploymentsService) ListProjectDeployments(pid interface{}, opts *ListProjectDeploymentsOptions, options ...RequestOptionFunc) ([]*Deployment, *Response, error)

ListProjectDeployments gets a list of deployments in a project.

GitLab API docs: https://docs.gitlab.com/ce/api/deployments.html#list-project-deployments

func (*DeploymentsService) UpdateProjectDeployment added in v0.39.1

func (s *DeploymentsService) UpdateProjectDeployment(pid interface{}, deployment int, opt *UpdateProjectDeploymentOptions, options ...RequestOptionFunc) (*Deployment, *Response, error)

UpdateProjectDeployment updates a project deployment.

GitLab API docs: https://docs.gitlab.com/ee/api/deployments.html#updating-a-deployment

type DetailedStatus added in v0.39.1

type DetailedStatus struct {
	Icon         string `json:"icon"`
	Text         string `json:"text"`
	Label        string `json:"label"`
	Group        string `json:"group"`
	Tooltip      string `json:"tooltip"`
	HasDetails   bool   `json:"has_details"`
	DetailsPath  string `json:"details_path"`
	Illustration struct {
		Image string `json:"image"`
	} `json:"illustration"`
	Favicon string `json:"favicon"`
}

DetailedStatus contains detailed information about the status of a pipeline.

type Diff

type Diff struct {
	Diff        string `json:"diff"`
	NewPath     string `json:"new_path"`
	OldPath     string `json:"old_path"`
	AMode       string `json:"a_mode"`
	BMode       string `json:"b_mode"`
	NewFile     bool   `json:"new_file"`
	RenamedFile bool   `json:"renamed_file"`
	DeletedFile bool   `json:"deleted_file"`
}

Diff represents a GitLab diff.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html

func (Diff) String

func (d Diff) String() string

type Discussion added in v0.11.2

type Discussion struct {
	ID             string  `json:"id"`
	IndividualNote bool    `json:"individual_note"`
	Notes          []*Note `json:"notes"`
}

Discussion represents a GitLab discussion.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html

func (Discussion) String added in v0.11.2

func (d Discussion) String() string

type DiscussionsService added in v0.11.2

type DiscussionsService struct {
	// contains filtered or unexported fields
}

DiscussionsService handles communication with the discussions related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html

func (*DiscussionsService) AddCommitDiscussionNote added in v0.11.2

func (s *DiscussionsService) AddCommitDiscussionNote(pid interface{}, commit string, discussion string, opt *AddCommitDiscussionNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

AddCommitDiscussionNote creates a new discussion to a single project commit.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-commit-thread

func (*DiscussionsService) AddEpicDiscussionNote added in v0.11.2

func (s *DiscussionsService) AddEpicDiscussionNote(gid interface{}, epic int, discussion string, opt *AddEpicDiscussionNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

AddEpicDiscussionNote creates a new discussion to a single project epic.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-epic-thread

func (*DiscussionsService) AddIssueDiscussionNote added in v0.11.2

func (s *DiscussionsService) AddIssueDiscussionNote(pid interface{}, issue int, discussion string, opt *AddIssueDiscussionNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

AddIssueDiscussionNote creates a new discussion to a single project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-issue-thread

func (*DiscussionsService) AddMergeRequestDiscussionNote added in v0.11.2

func (s *DiscussionsService) AddMergeRequestDiscussionNote(pid interface{}, mergeRequest int, discussion string, opt *AddMergeRequestDiscussionNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

AddMergeRequestDiscussionNote creates a new discussion to a single project merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-merge-request-discussion

func (*DiscussionsService) AddSnippetDiscussionNote added in v0.11.2

func (s *DiscussionsService) AddSnippetDiscussionNote(pid interface{}, snippet int, discussion string, opt *AddSnippetDiscussionNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

AddSnippetDiscussionNote creates a new discussion to a single project snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-snippet-thread

func (*DiscussionsService) CreateCommitDiscussion added in v0.11.2

func (s *DiscussionsService) CreateCommitDiscussion(pid interface{}, commit string, opt *CreateCommitDiscussionOptions, options ...RequestOptionFunc) (*Discussion, *Response, error)

CreateCommitDiscussion creates a new discussion to a single project commit.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#create-new-commit-thread

func (*DiscussionsService) CreateEpicDiscussion added in v0.11.2

func (s *DiscussionsService) CreateEpicDiscussion(gid interface{}, epic int, opt *CreateEpicDiscussionOptions, options ...RequestOptionFunc) (*Discussion, *Response, error)

CreateEpicDiscussion creates a new discussion for a single epic. Epic discussions are comments users can post to a epic.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#add-note-to-existing-epic-thread

func (*DiscussionsService) CreateIssueDiscussion added in v0.11.2

func (s *DiscussionsService) CreateIssueDiscussion(pid interface{}, issue int, opt *CreateIssueDiscussionOptions, options ...RequestOptionFunc) (*Discussion, *Response, error)

CreateIssueDiscussion creates a new discussion to a single project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#create-new-issue-thread

func (*DiscussionsService) CreateMergeRequestDiscussion added in v0.11.2

func (s *DiscussionsService) CreateMergeRequestDiscussion(pid interface{}, mergeRequest int, opt *CreateMergeRequestDiscussionOptions, options ...RequestOptionFunc) (*Discussion, *Response, error)

CreateMergeRequestDiscussion creates a new discussion for a single merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#create-new-merge-request-thread

func (*DiscussionsService) CreateSnippetDiscussion added in v0.11.2

func (s *DiscussionsService) CreateSnippetDiscussion(pid interface{}, snippet int, opt *CreateSnippetDiscussionOptions, options ...RequestOptionFunc) (*Discussion, *Response, error)

CreateSnippetDiscussion creates a new discussion for a single snippet. Snippet discussions are comments users can post to a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#create-new-snippet-thread

func (*DiscussionsService) DeleteCommitDiscussionNote added in v0.11.2

func (s *DiscussionsService) DeleteCommitDiscussionNote(pid interface{}, commit string, discussion string, note int, options ...RequestOptionFunc) (*Response, error)

DeleteCommitDiscussionNote deletes an existing discussion of an commit.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#delete-a-commit-thread-note

func (*DiscussionsService) DeleteEpicDiscussionNote added in v0.11.2

func (s *DiscussionsService) DeleteEpicDiscussionNote(gid interface{}, epic int, discussion string, note int, options ...RequestOptionFunc) (*Response, error)

DeleteEpicDiscussionNote deletes an existing discussion of a epic.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#delete-an-epic-thread-note

func (*DiscussionsService) DeleteIssueDiscussionNote added in v0.11.2

func (s *DiscussionsService) DeleteIssueDiscussionNote(pid interface{}, issue int, discussion string, note int, options ...RequestOptionFunc) (*Response, error)

DeleteIssueDiscussionNote deletes an existing discussion of an issue.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#delete-an-issue-thread-note

func (*DiscussionsService) DeleteMergeRequestDiscussionNote added in v0.11.2

func (s *DiscussionsService) DeleteMergeRequestDiscussionNote(pid interface{}, mergeRequest int, discussion string, note int, options ...RequestOptionFunc) (*Response, error)

DeleteMergeRequestDiscussionNote deletes an existing discussion of a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#delete-a-merge-request-discussion-note

func (*DiscussionsService) DeleteSnippetDiscussionNote added in v0.11.2

func (s *DiscussionsService) DeleteSnippetDiscussionNote(pid interface{}, snippet int, discussion string, note int, options ...RequestOptionFunc) (*Response, error)

DeleteSnippetDiscussionNote deletes an existing discussion of a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#delete-a-snippet-thread-note

func (*DiscussionsService) GetCommitDiscussion added in v0.11.2

func (s *DiscussionsService) GetCommitDiscussion(pid interface{}, commit string, discussion string, options ...RequestOptionFunc) (*Discussion, *Response, error)

GetCommitDiscussion returns a single discussion for a specific project commit.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#get-single-commit-discussion-item

func (*DiscussionsService) GetEpicDiscussion added in v0.11.2

func (s *DiscussionsService) GetEpicDiscussion(gid interface{}, epic int, discussion string, options ...RequestOptionFunc) (*Discussion, *Response, error)

GetEpicDiscussion returns a single discussion for a given epic.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#get-single-epic-discussion-item

func (*DiscussionsService) GetIssueDiscussion added in v0.11.2

func (s *DiscussionsService) GetIssueDiscussion(pid interface{}, issue int, discussion string, options ...RequestOptionFunc) (*Discussion, *Response, error)

GetIssueDiscussion returns a single discussion for a specific project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#get-single-issue-discussion-item

func (*DiscussionsService) GetMergeRequestDiscussion added in v0.11.2

func (s *DiscussionsService) GetMergeRequestDiscussion(pid interface{}, mergeRequest int, discussion string, options ...RequestOptionFunc) (*Discussion, *Response, error)

GetMergeRequestDiscussion returns a single discussion for a given merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#get-single-merge-request-discussion-item

func (*DiscussionsService) GetSnippetDiscussion added in v0.11.2

func (s *DiscussionsService) GetSnippetDiscussion(pid interface{}, snippet int, discussion string, options ...RequestOptionFunc) (*Discussion, *Response, error)

GetSnippetDiscussion returns a single discussion for a given snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#get-single-snippet-discussion-item

func (*DiscussionsService) ListCommitDiscussions added in v0.11.2

func (s *DiscussionsService) ListCommitDiscussions(pid interface{}, commit string, opt *ListCommitDiscussionsOptions, options ...RequestOptionFunc) ([]*Discussion, *Response, error)

ListCommitDiscussions gets a list of all discussions for a single commit.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#list-project-commit-discussion-items

func (*DiscussionsService) ListGroupEpicDiscussions added in v0.11.2

func (s *DiscussionsService) ListGroupEpicDiscussions(gid interface{}, epic int, opt *ListGroupEpicDiscussionsOptions, options ...RequestOptionFunc) ([]*Discussion, *Response, error)

ListGroupEpicDiscussions gets a list of all discussions for a single epic. Epic discussions are comments users can post to a epic.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#list-group-epic-discussion-items

func (*DiscussionsService) ListIssueDiscussions added in v0.11.2

func (s *DiscussionsService) ListIssueDiscussions(pid interface{}, issue int, opt *ListIssueDiscussionsOptions, options ...RequestOptionFunc) ([]*Discussion, *Response, error)

ListIssueDiscussions gets a list of all discussions for a single issue.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#list-project-issue-discussion-items

func (*DiscussionsService) ListMergeRequestDiscussions added in v0.11.2

func (s *DiscussionsService) ListMergeRequestDiscussions(pid interface{}, mergeRequest int, opt *ListMergeRequestDiscussionsOptions, options ...RequestOptionFunc) ([]*Discussion, *Response, error)

ListMergeRequestDiscussions gets a list of all discussions for a single merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#list-project-merge-request-discussion-items

func (*DiscussionsService) ListSnippetDiscussions added in v0.11.2

func (s *DiscussionsService) ListSnippetDiscussions(pid interface{}, snippet int, opt *ListSnippetDiscussionsOptions, options ...RequestOptionFunc) ([]*Discussion, *Response, error)

ListSnippetDiscussions gets a list of all discussions for a single snippet. Snippet discussions are comments users can post to a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#list-project-snippet-discussion-items

func (*DiscussionsService) ResolveMergeRequestDiscussion added in v0.11.2

func (s *DiscussionsService) ResolveMergeRequestDiscussion(pid interface{}, mergeRequest int, discussion string, opt *ResolveMergeRequestDiscussionOptions, options ...RequestOptionFunc) (*Discussion, *Response, error)

ResolveMergeRequestDiscussion resolves/unresolves whole discussion of a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#resolve-a-merge-request-thread

func (*DiscussionsService) UpdateCommitDiscussionNote added in v0.11.2

func (s *DiscussionsService) UpdateCommitDiscussionNote(pid interface{}, commit string, discussion string, note int, opt *UpdateCommitDiscussionNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

UpdateCommitDiscussionNote modifies existing discussion of an commit.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#modify-an-existing-commit-thread-note

func (*DiscussionsService) UpdateEpicDiscussionNote added in v0.11.2

func (s *DiscussionsService) UpdateEpicDiscussionNote(gid interface{}, epic int, discussion string, note int, opt *UpdateEpicDiscussionNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

UpdateEpicDiscussionNote modifies existing discussion of a epic.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#modify-existing-epic-thread-note

func (*DiscussionsService) UpdateIssueDiscussionNote added in v0.11.2

func (s *DiscussionsService) UpdateIssueDiscussionNote(pid interface{}, issue int, discussion string, note int, opt *UpdateIssueDiscussionNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

UpdateIssueDiscussionNote modifies existing discussion of an issue.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#modify-existing-issue-thread-note

func (*DiscussionsService) UpdateMergeRequestDiscussionNote added in v0.11.2

func (s *DiscussionsService) UpdateMergeRequestDiscussionNote(pid interface{}, mergeRequest int, discussion string, note int, opt *UpdateMergeRequestDiscussionNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

UpdateMergeRequestDiscussionNote modifies existing discussion of a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#modify-existing-merge-request-discussion-note

func (*DiscussionsService) UpdateSnippetDiscussionNote added in v0.11.2

func (s *DiscussionsService) UpdateSnippetDiscussionNote(pid interface{}, snippet int, discussion string, note int, opt *UpdateSnippetDiscussionNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

UpdateSnippetDiscussionNote modifies existing discussion of a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#modify-existing-snippet-thread-note

type DownloadArtifactsFileOptions added in v0.39.1

type DownloadArtifactsFileOptions struct {
	Job *string `url:"job" json:"job"`
}

DownloadArtifactsFileOptions represents the available DownloadArtifactsFile() options.

GitLab API docs: https://docs.gitlab.com/ce/api/job_artifacts.html#download-the-artifacts-archive

type DroneCIService

type DroneCIService struct {
	Service
	Properties *DroneCIServiceProperties `json:"properties"`
}

DroneCIService represents Drone CI service settings.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#drone-ci

type DroneCIServiceProperties

type DroneCIServiceProperties struct {
	Token                 string `json:"token"`
	DroneURL              string `json:"drone_url"`
	EnableSSLVerification bool   `json:"enable_ssl_verification"`
}

DroneCIServiceProperties represents Drone CI specific properties.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#drone-ci

type EditClusterOptions added in v0.39.1

type EditClusterOptions struct {
	Name                *string                        `url:"name,omitempty" json:"name,omitempty"`
	Domain              *string                        `url:"domain,omitempty" json:"domain,omitempty"`
	EnvironmentScope    *string                        `url:"environment_scope,omitempty" json:"environment_scope,omitempty"`
	ManagementProjectID *string                        `url:"management_project_id,omitempty" json:"management_project_id,omitempty"`
	PlatformKubernetes  *EditPlatformKubernetesOptions `url:"platform_kubernetes_attributes,omitempty" json:"platform_kubernetes_attributes,omitempty"`
}

EditClusterOptions represents the available EditCluster() options.

GitLab API docs: https://docs.gitlab.com/ee/api/project_clusters.html#edit-project-cluster

type EditEnvironmentOptions added in v0.7.0

type EditEnvironmentOptions struct {
	Name        *string `url:"name,omitempty" json:"name,omitempty"`
	ExternalURL *string `url:"external_url,omitempty" json:"external_url,omitempty"`
}

EditEnvironmentOptions represents the available EditEnvironment() options.

GitLab API docs: https://docs.gitlab.com/ee/api/environments.html#edit-an-existing-environment

type EditGroupBadgeOptions added in v0.39.1

type EditGroupBadgeOptions struct {
	LinkURL  *string `url:"link_url,omitempty" json:"link_url,omitempty"`
	ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"`
}

EditGroupBadgeOptions represents the available EditGroupBadge() options.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html#edit-a-badge-of-a-group

type EditGroupClusterOptions added in v0.39.1

type EditGroupClusterOptions struct {
	Name                *string                             `url:"name,omitempty" json:"name,omitempty"`
	Domain              *string                             `url:"domain,omitempty" json:"domain,omitempty"`
	EnvironmentScope    *string                             `url:"environment_scope,omitempty" json:"environment_scope,omitempty"`
	PlatformKubernetes  *EditGroupPlatformKubernetesOptions `url:"platform_kubernetes_attributes,omitempty" json:"platform_kubernetes_attributes,omitempty"`
	ManagementProjectID *string                             `url:"management_project_id,omitempty" json:"management_project_id,omitempty"`
}

EditGroupClusterOptions represents the available EditCluster() options.

GitLab API docs: https://docs.gitlab.com/ee/api/group_clusters.html#edit-group-cluster

type EditGroupHookOptions added in v0.39.1

type EditGroupHookOptions struct {
	URL                      *string `url:"url,omitempty" json:"url,omitempty"`
	PushEvents               *bool   `url:"push_events,omitempty" json:"push_events,omitempty"`
	IssuesEvents             *bool   `url:"issues_events,omitempty" json:"issues_events,omitempty"`
	ConfidentialIssuesEvents *bool   `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"`
	ConfidentialNoteEvents   *bool   `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"`
	MergeRequestsEvents      *bool   `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
	TagPushEvents            *bool   `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
	NoteEvents               *bool   `url:"note_events,omitempty" json:"note_events,omitempty"`
	JobEvents                *bool   `url:"job_events,omitempty" json:"job_events,omitempty"`
	PipelineEvents           *bool   `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"`
	WikiPageEvents           *bool   `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
	EnableSSLVerification    *bool   `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
	Token                    *string `url:"token,omitempty" json:"token,omitempty"`
}

EditGroupHookOptions represents the available EditGroupHook() options.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#edit-group-hook

type EditGroupMemberOptions added in v0.6.2

type EditGroupMemberOptions struct {
	AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
	ExpiresAt   *string           `url:"expires_at,omitempty" json:"expires_at"`
}

EditGroupMemberOptions represents the available EditGroupMember() options.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#edit-a-member-of-a-group-or-project

type EditGroupPlatformKubernetesOptions added in v0.39.1

type EditGroupPlatformKubernetesOptions struct {
	APIURL *string `url:"api_url,omitempty" json:"api_url,omitempty"`
	Token  *string `url:"token,omitempty" json:"token,omitempty"`
	CaCert *string `url:"ca_cert,omitempty" json:"ca_cert,omitempty"`
}

EditGroupPlatformKubernetesOptions represents the available PlatformKubernetes options for editing.

type EditGroupPushRuleOptions added in v0.39.1

type EditGroupPushRuleOptions struct {
	DenyDeleteTag              *bool   `url:"deny_delete_tag,omitempty" json:"deny_delete_tag,omitempty"`
	MemberCheck                *bool   `url:"member_check,omitempty" json:"member_check,omitempty"`
	PreventSecrets             *bool   `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"`
	CommitMessageRegex         *string `url:"commit_message_regex,omitempty" json:"commit_message_regex,omitempty"`
	CommitMessageNegativeRegex *string `url:"commit_message_negative_regex,omitempty" json:"commit_message_negative_regex,omitempty"`
	BranchNameRegex            *string `url:"branch_name_regex,omitempty" json:"branch_name_regex,omitempty"`
	AuthorEmailRegex           *string `url:"author_email_regex,omitempty" json:"author_email_regex,omitempty"`
	FileNameRegex              *string `url:"file_name_regex,omitempty" json:"file_name_regex,omitempty"`
	MaxFileSize                *int    `url:"max_file_size,omitempty" json:"max_file_size,omitempty"`
	CommitCommitterCheck       *bool   `url:"commit_committer_check,omitempty" json:"commit_committer_check,omitempty"`
	RejectUnsignedCommits      *bool   `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"`
}

EditGroupPushRuleOptions represents the available EditGroupPushRule() options.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#edit-group-push-rule

type EditPipelineScheduleOptions added in v0.9.0

type EditPipelineScheduleOptions struct {
	Description  *string `url:"description,omitempty" json:"description,omitempty"`
	Ref          *string `url:"ref,omitempty" json:"ref,omitempty"`
	Cron         *string `url:"cron,omitempty" json:"cron,omitempty"`
	CronTimezone *string `url:"cron_timezone,omitempty" json:"cron_timezone,omitempty"`
	Active       *bool   `url:"active,omitempty" json:"active,omitempty"`
}

EditPipelineScheduleOptions represents the available EditPipelineSchedule() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#create-a-new-pipeline-schedule

type EditPipelineScheduleVariableOptions added in v0.9.0

type EditPipelineScheduleVariableOptions struct {
	Value        *string `url:"value" json:"value"`
	VariableType *string `url:"variable_type,omitempty" json:"variable_type,omitempty"`
}

EditPipelineScheduleVariableOptions represents the available EditPipelineScheduleVariable() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#edit-a-pipeline-schedule-variable

type EditPipelineTriggerOptions added in v0.6.0

type EditPipelineTriggerOptions struct {
	Description *string `url:"description,omitempty" json:"description,omitempty"`
}

EditPipelineTriggerOptions represents the available EditPipelineTrigger() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#update-a-project-trigger

type EditPlatformKubernetesOptions added in v0.39.1

type EditPlatformKubernetesOptions struct {
	APIURL    *string `url:"api_url,omitempty" json:"api_url,omitempty"`
	Token     *string `url:"token,omitempty" json:"token,omitempty"`
	CaCert    *string `url:"ca_cert,omitempty" json:"ca_cert,omitempty"`
	Namespace *string `url:"namespace,omitempty" json:"namespace,omitempty"`
}

EditPlatformKubernetesOptions represents the available PlatformKubernetes options for editing.

type EditProjectBadgeOptions added in v0.11.1

type EditProjectBadgeOptions struct {
	LinkURL  *string `url:"link_url,omitempty" json:"link_url,omitempty"`
	ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"`
}

EditProjectBadgeOptions represents the available EditProjectBadge() options.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#edit-a-badge-of-a-project

type EditProjectHookOptions

type EditProjectHookOptions struct {
	URL                      *string `url:"url,omitempty" json:"url,omitempty"`
	ConfidentialNoteEvents   *bool   `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"`
	PushEvents               *bool   `url:"push_events,omitempty" json:"push_events,omitempty"`
	PushEventsBranchFilter   *string `url:"push_events_branch_filter,omitempty" json:"push_events_branch_filter,omitempty"`
	IssuesEvents             *bool   `url:"issues_events,omitempty" json:"issues_events,omitempty"`
	ConfidentialIssuesEvents *bool   `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"`
	MergeRequestsEvents      *bool   `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
	TagPushEvents            *bool   `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
	NoteEvents               *bool   `url:"note_events,omitempty" json:"note_events,omitempty"`
	JobEvents                *bool   `url:"job_events,omitempty" json:"job_events,omitempty"`
	PipelineEvents           *bool   `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"`
	WikiPageEvents           *bool   `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
	EnableSSLVerification    *bool   `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
	Token                    *string `url:"token,omitempty" json:"token,omitempty"`
}

EditProjectHookOptions represents the available EditProjectHook() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#edit-project-hook

type EditProjectMemberOptions

type EditProjectMemberOptions struct {
	AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
	ExpiresAt   *string           `url:"expires_at,omitempty" json:"expires_at"`
}

EditProjectMemberOptions represents the available EditProjectMember() options.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#edit-a-member-of-a-group-or-project

type EditProjectMirrorOptions added in v0.39.1

type EditProjectMirrorOptions struct {
	Enabled               *bool `url:"enabled,omitempty" json:"enabled,omitempty"`
	OnlyProtectedBranches *bool `url:"only_protected_branches,omitempty" json:"only_protected_branches,omitempty"`
	KeepDivergentRefs     *bool `url:"keep_divergent_refs,omitempty" json:"keep_divergent_refs,omitempty"`
}

EditProjectMirrorOptions contains the properties requires to edit an existing project mirror.

GitLab API docs: https://docs.gitlab.com/ce/api/remote_mirrors.html#update-a-remote-mirrors-attributes

type EditProjectOptions

type EditProjectOptions struct {
	Name                                      *string             `url:"name,omitempty" json:"name,omitempty"`
	Path                                      *string             `url:"path,omitempty" json:"path,omitempty"`
	DefaultBranch                             *string             `url:"default_branch,omitempty" json:"default_branch,omitempty"`
	Description                               *string             `url:"description,omitempty" json:"description,omitempty"`
	IssuesAccessLevel                         *AccessControlValue `url:"issues_access_level,omitempty" json:"issues_access_level,omitempty"`
	RepositoryAccessLevel                     *AccessControlValue `url:"repository_access_level,omitempty" json:"repository_access_level,omitempty"`
	MergeRequestsAccessLevel                  *AccessControlValue `url:"merge_requests_access_level,omitempty" json:"merge_requests_access_level,omitempty"`
	ForkingAccessLevel                        *AccessControlValue `url:"forking_access_level,omitempty" json:"forking_access_level,omitempty"`
	BuildsAccessLevel                         *AccessControlValue `url:"builds_access_level,omitempty" json:"builds_access_level,omitempty"`
	WikiAccessLevel                           *AccessControlValue `url:"wiki_access_level,omitempty" json:"wiki_access_level,omitempty"`
	SnippetsAccessLevel                       *AccessControlValue `url:"snippets_access_level,omitempty" json:"snippets_access_level,omitempty"`
	PagesAccessLevel                          *AccessControlValue `url:"pages_access_level,omitempty" json:"pages_access_level,omitempty"`
	EmailsDisabled                            *bool               `url:"emails_disabled,omitempty" json:"emails_disabled,omitempty"`
	ResolveOutdatedDiffDiscussions            *bool               `url:"resolve_outdated_diff_discussions,omitempty" json:"resolve_outdated_diff_discussions,omitempty"`
	ContainerRegistryEnabled                  *bool               `url:"container_registry_enabled,omitempty" json:"container_registry_enabled,omitempty"`
	SharedRunnersEnabled                      *bool               `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
	Visibility                                *VisibilityValue    `url:"visibility,omitempty" json:"visibility,omitempty"`
	ImportURL                                 *string             `url:"import_url,omitempty" json:"import_url,omitempty"`
	PublicBuilds                              *bool               `url:"public_builds,omitempty" json:"public_builds,omitempty"`
	OnlyAllowMergeIfPipelineSucceeds          *bool               `url:"only_allow_merge_if_pipeline_succeeds,omitempty" json:"only_allow_merge_if_pipeline_succeeds,omitempty"`
	OnlyAllowMergeIfAllDiscussionsAreResolved *bool               `` /* 130-byte string literal not displayed */
	MergeMethod                               *MergeMethodValue   `url:"merge_method,omitempty" json:"merge_method,omitempty"`
	RemoveSourceBranchAfterMerge              *bool               `url:"remove_source_branch_after_merge,omitempty" json:"remove_source_branch_after_merge,omitempty"`
	LFSEnabled                                *bool               `url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"`
	RequestAccessEnabled                      *bool               `url:"request_access_enabled,omitempty" json:"request_access_enabled,omitempty"`
	TagList                                   *[]string           `url:"tag_list,omitempty" json:"tag_list,omitempty"`
	BuildGitStrategy                          *string             `url:"build_git_strategy,omitempty" json:"build_git_strategy,omitempty"`
	BuildTimeout                              *int                `url:"build_timeout,omitempty" json:"build_timeout,omitempty"`
	AutoCancelPendingPipelines                *string             `url:"auto_cancel_pending_pipelines,omitempty" json:"auto_cancel_pending_pipelines,omitempty"`
	BuildCoverageRegex                        *string             `url:"build_coverage_regex,omitempty" json:"build_coverage_regex,omitempty"`
	CIConfigPath                              *string             `url:"ci_config_path,omitempty" json:"ci_config_path,omitempty"`
	CIDefaultGitDepth                         *int                `url:"ci_default_git_depth,omitempty" json:"ci_default_git_depth,omitempty"`
	AutoDevopsEnabled                         *bool               `url:"auto_devops_enabled,omitempty" json:"auto_devops_enabled,omitempty"`
	AutoDevopsDeployStrategy                  *string             `url:"auto_devops_deploy_strategy,omitempty" json:"auto_devops_deploy_strategy,omitempty"`
	ApprovalsBeforeMerge                      *int                `url:"approvals_before_merge,omitempty" json:"approvals_before_merge,omitempty"`
	ExternalAuthorizationClassificationLabel  *string             `url:"external_authorization_classification_label,omitempty" json:"external_authorization_classification_label,omitempty"`
	Mirror                                    *bool               `url:"mirror,omitempty" json:"mirror,omitempty"`
	MirrorUserID                              *int                `url:"mirror_user_id,omitempty" json:"mirror_user_id,omitempty"`
	MirrorTriggerBuilds                       *bool               `url:"mirror_trigger_builds,omitempty" json:"mirror_trigger_builds,omitempty"`
	OnlyMirrorProtectedBranches               *bool               `url:"only_mirror_protected_branches,omitempty" json:"only_mirror_protected_branches,omitempty"`
	MirrorOverwritesDivergedBranches          *bool               `url:"mirror_overwrites_diverged_branches,omitempty" json:"mirror_overwrites_diverged_branches,omitempty"`
	PackagesEnabled                           *bool               `url:"packages_enabled,omitempty" json:"packages_enabled,omitempty"`
	ServiceDeskEnabled                        *bool               `url:"service_desk_enabled,omitempty" json:"service_desk_enabled,omitempty"`
	AutocloseReferencedIssues                 *bool               `url:"autoclose_referenced_issues,omitempty" json:"autoclose_referenced_issues,omitempty"`

	// Deprecated members
	IssuesEnabled        *bool `url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"`
	MergeRequestsEnabled *bool `url:"merge_requests_enabled,omitempty" json:"merge_requests_enabled,omitempty"`
	JobsEnabled          *bool `url:"jobs_enabled,omitempty" json:"jobs_enabled,omitempty"`
	WikiEnabled          *bool `url:"wiki_enabled,omitempty" json:"wiki_enabled,omitempty"`
	SnippetsEnabled      *bool `url:"snippets_enabled,omitempty" json:"snippets_enabled,omitempty"`
}

EditProjectOptions represents the available EditProject() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#edit-project

type EditProjectPushRuleOptions added in v0.39.1

type EditProjectPushRuleOptions struct {
	AuthorEmailRegex           *string `url:"author_email_regex,omitempty" json:"author_email_regex,omitempty"`
	BranchNameRegex            *string `url:"branch_name_regex,omitempty" json:"branch_name_regex,omitempty"`
	CommitMessageRegex         *string `url:"commit_message_regex,omitempty" json:"commit_message_regex,omitempty"`
	CommitMessageNegativeRegex *string `url:"commit_message_negative_regex,omitempty" json:"commit_message_negative_regex,omitempty"`
	FileNameRegex              *string `url:"file_name_regex,omitempty" json:"file_name_regex,omitempty"`
	DenyDeleteTag              *bool   `url:"deny_delete_tag,omitempty" json:"deny_delete_tag,omitempty"`
	MemberCheck                *bool   `url:"member_check,omitempty" json:"member_check,omitempty"`
	PreventSecrets             *bool   `url:"prevent_secrets,omitempty" json:"prevent_secrets,omitempty"`
	MaxFileSize                *int    `url:"max_file_size,omitempty" json:"max_file_size,omitempty"`
	CommitCommitterCheck       *bool   `url:"commit_committer_check,omitempty" json:"commit_committer_check,omitempty"`
	RejectUnsignedCommits      *bool   `url:"reject_unsigned_commits,omitempty" json:"reject_unsigned_commits,omitempty"`
}

EditProjectPushRuleOptions represents the available EditProjectPushRule() options.

GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#edit-project-push-rule

type EditWikiPageOptions added in v0.7.0

type EditWikiPageOptions struct {
	Content *string `url:"content" json:"content"`
	Title   *string `url:"title" json:"title"`
	Format  *string `url:"format,omitempty" json:"format,omitempty"`
}

EditWikiPageOptions represents options to EditWikiPage.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html#edit-an-existing-wiki-page

type Email added in v0.4.0

type Email struct {
	ID    int    `json:"id"`
	Email string `json:"email"`
}

Email represents an Email.

GitLab API docs: https://doc.gitlab.com/ce/api/users.html#list-emails

type EnableProjectRunnerOptions added in v0.7.5

type EnableProjectRunnerOptions struct {
	RunnerID int `json:"runner_id"`
}

EnableProjectRunnerOptions represents the available EnableProjectRunner() options.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#enable-a-runner-in-project

type Environment added in v0.7.0

type Environment struct {
	ID             int         `json:"id"`
	Name           string      `json:"name"`
	Slug           string      `json:"slug"`
	State          string      `json:"state"`
	ExternalURL    string      `json:"external_url"`
	Project        *Project    `json:"project"`
	LastDeployment *Deployment `json:"last_deployment"`
}

Environment represents a GitLab environment.

GitLab API docs: https://docs.gitlab.com/ce/api/environments.html

func (Environment) String added in v0.7.0

func (env Environment) String() string

type EnvironmentsService added in v0.7.0

type EnvironmentsService struct {
	// contains filtered or unexported fields
}

EnvironmentsService handles communication with the environment related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/environments.html

func (*EnvironmentsService) CreateEnvironment added in v0.7.0

func (s *EnvironmentsService) CreateEnvironment(pid interface{}, opt *CreateEnvironmentOptions, options ...RequestOptionFunc) (*Environment, *Response, error)

CreateEnvironment adds an environment to a project. This is an idempotent method and can be called multiple times with the same parameters. Createing an environment that is already a environment does not affect the existing environmentship.

GitLab API docs: https://docs.gitlab.com/ee/api/environments.html#create-a-new-environment

func (*EnvironmentsService) DeleteEnvironment added in v0.7.0

func (s *EnvironmentsService) DeleteEnvironment(pid interface{}, environment int, options ...RequestOptionFunc) (*Response, error)

DeleteEnvironment removes an environment from a project team.

GitLab API docs: https://docs.gitlab.com/ce/api/environments.html#remove-a-environment-from-a-group-or-project

func (*EnvironmentsService) EditEnvironment added in v0.7.0

func (s *EnvironmentsService) EditEnvironment(pid interface{}, environment int, opt *EditEnvironmentOptions, options ...RequestOptionFunc) (*Environment, *Response, error)

EditEnvironment updates a project team environment to a specified access level..

GitLab API docs: https://docs.gitlab.com/ee/api/environments.html#edit-an-existing-environment

func (*EnvironmentsService) GetEnvironment added in v0.39.1

func (s *EnvironmentsService) GetEnvironment(pid interface{}, environment int, options ...RequestOptionFunc) (*Environment, *Response, error)

GetEnvironment gets a specific environment from a project.

GitLab API docs: https://docs.gitlab.com/ee/api/environments.html#get-a-specific-environment

func (*EnvironmentsService) ListEnvironments added in v0.7.0

func (s *EnvironmentsService) ListEnvironments(pid interface{}, opts *ListEnvironmentsOptions, options ...RequestOptionFunc) ([]*Environment, *Response, error)

ListEnvironments gets a list of environments from a project, sorted by name alphabetically.

GitLab API docs: https://docs.gitlab.com/ee/api/environments.html#list-environments

func (*EnvironmentsService) StopEnvironment added in v0.39.1

func (s *EnvironmentsService) StopEnvironment(pid interface{}, environmentID int, options ...RequestOptionFunc) (*Response, error)

StopEnvironment stop an environment from a project team.

GitLab API docs: https://docs.gitlab.com/ce/api/environments.html#stop-an-environment

type Epic added in v0.39.1

type Epic struct {
	ID                      int         `json:"id"`
	IID                     int         `json:"iid"`
	GroupID                 int         `json:"group_id"`
	ParentID                int         `json:"parent_id"`
	Title                   string      `json:"title"`
	Description             string      `json:"description"`
	State                   string      `json:"state"`
	WebURL                  string      `json:"web_url"`
	Author                  *EpicAuthor `json:"author"`
	StartDate               *ISOTime    `json:"start_date"`
	StartDateIsFixed        bool        `json:"start_date_is_fixed"`
	StartDateFixed          *ISOTime    `json:"start_date_fixed"`
	StartDateFromMilestones *ISOTime    `json:"start_date_from_milestones"`
	DueDate                 *ISOTime    `json:"due_date"`
	DueDateIsFixed          bool        `json:"due_date_is_fixed"`
	DueDateFixed            *ISOTime    `json:"due_date_fixed"`
	DueDateFromMilestones   *ISOTime    `json:"due_date_from_milestones"`
	CreatedAt               *time.Time  `json:"created_at"`
	UpdatedAt               *time.Time  `json:"updated_at"`
	Labels                  []string    `json:"labels"`
	Upvotes                 int         `json:"upvotes"`
	Downvotes               int         `json:"downvotes"`
	UserNotesCount          int         `json:"user_notes_count"`
	URL                     string      `json:"url"`
}

Epic represents a GitLab epic.

GitLab API docs: https://docs.gitlab.com/ee/api/epics.html

func (Epic) String added in v0.39.1

func (e Epic) String() string

type EpicAuthor added in v0.39.1

type EpicAuthor struct {
	ID        int    `json:"id"`
	State     string `json:"state"`
	WebURL    string `json:"web_url"`
	Name      string `json:"name"`
	AvatarURL string `json:"avatar_url"`
	Username  string `json:"username"`
}

EpicAuthor represents a author of the epic.

type EpicIssueAssignment added in v0.39.1

type EpicIssueAssignment struct {
	ID    int    `json:"id"`
	Epic  *Epic  `json:"epic"`
	Issue *Issue `json:"issue"`
}

EpicIssueAssignment contains both the epic and issue objects returned from Gitlab with the assignment ID.

GitLab API docs: https://docs.gitlab.com/ee/api/epic_issues.html

type EpicIssuesService added in v0.39.1

type EpicIssuesService struct {
	// contains filtered or unexported fields
}

EpicIssuesService handles communication with the epic issue related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/epic_issues.html

func (*EpicIssuesService) AssignEpicIssue added in v0.39.1

func (s *EpicIssuesService) AssignEpicIssue(gid interface{}, epic, issue int, options ...RequestOptionFunc) (*EpicIssueAssignment, *Response, error)

AssignEpicIssue assigns an existing issue to an epic.

Gitlab API Docs: https://docs.gitlab.com/ee/api/epic_issues.html#assign-an-issue-to-the-epic

func (*EpicIssuesService) ListEpicIssues added in v0.39.1

func (s *EpicIssuesService) ListEpicIssues(gid interface{}, epic int, opt *ListOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

ListEpicIssues get a list of epic issues.

Gitlab API docs: https://docs.gitlab.com/ee/api/epic_issues.html#list-issues-for-an-epic

func (*EpicIssuesService) RemoveEpicIssue added in v0.39.1

func (s *EpicIssuesService) RemoveEpicIssue(gid interface{}, epic, epicIssue int, options ...RequestOptionFunc) (*EpicIssueAssignment, *Response, error)

RemoveEpicIssue removes an issue from an epic.

Gitlab API Docs: https://docs.gitlab.com/ee/api/epic_issues.html#remove-an-issue-from-the-epic

func (*EpicIssuesService) UpdateEpicIssueAssignment added in v0.39.1

func (s *EpicIssuesService) UpdateEpicIssueAssignment(gid interface{}, epic, epicIssue int, opt *UpdateEpicIsssueAssignmentOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

UpdateEpicIssueAssignment moves an issue before or after another issue in an epic issue list.

Gitlab API Docs: https://docs.gitlab.com/ee/api/epic_issues.html#update-epic---issue-association

type EpicsService added in v0.39.1

type EpicsService struct {
	// contains filtered or unexported fields
}

EpicsService handles communication with the epic related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/epics.html

func (*EpicsService) CreateEpic added in v0.39.1

func (s *EpicsService) CreateEpic(gid interface{}, opt *CreateEpicOptions, options ...RequestOptionFunc) (*Epic, *Response, error)

CreateEpic creates a new group epic.

GitLab API docs: https://docs.gitlab.com/ee/api/epics.html#new-epic

func (*EpicsService) DeleteEpic added in v0.39.1

func (s *EpicsService) DeleteEpic(gid interface{}, epic int, options ...RequestOptionFunc) (*Response, error)

DeleteEpic deletes a single group epic.

GitLab API docs: https://docs.gitlab.com/ee/api/epics.html#delete-epic

func (*EpicsService) GetEpic added in v0.39.1

func (s *EpicsService) GetEpic(gid interface{}, epic int, options ...RequestOptionFunc) (*Epic, *Response, error)

GetEpic gets a single group epic.

GitLab API docs: https://docs.gitlab.com/ee/api/epics.html#single-epic

func (s *EpicsService) GetEpicLinks(gid interface{}, epic int, options ...RequestOptionFunc) ([]*Epic, *Response, error)

GetEpicLinks gets all child epics of an epic.

GitLab API docs: https://docs.gitlab.com/ee/api/epic_links.html

func (*EpicsService) ListGroupEpics added in v0.39.1

func (s *EpicsService) ListGroupEpics(gid interface{}, opt *ListGroupEpicsOptions, options ...RequestOptionFunc) ([]*Epic, *Response, error)

ListGroupEpics gets a list of group epics. This function accepts pagination parameters page and per_page to return the list of group epics.

GitLab API docs: https://docs.gitlab.com/ee/api/epics.html#list-epics-for-a-group

func (*EpicsService) UpdateEpic added in v0.39.1

func (s *EpicsService) UpdateEpic(gid interface{}, epic int, opt *UpdateEpicOptions, options ...RequestOptionFunc) (*Epic, *Response, error)

UpdateEpic updates an existing group epic. This function is also used to mark an epic as closed.

GitLab API docs: https://docs.gitlab.com/ee/api/epics.html#update-epic

type ErrorResponse

type ErrorResponse struct {
	Body     []byte
	Response *http.Response
	Message  string
}

An ErrorResponse reports one or more errors caused by an API request.

GitLab API docs: https://docs.gitlab.com/ce/api/README.html#data-validation-and-error-reporting

func (*ErrorResponse) Error

func (e *ErrorResponse) Error() string

type EventTargetTypeValue added in v0.8.0

type EventTargetTypeValue string

EventTargetTypeValue represents actions type value for contribution events

const (
	IssueEventTargetType        EventTargetTypeValue = "issue"
	MilestoneEventTargetType    EventTargetTypeValue = "milestone"
	MergeRequestEventTargetType EventTargetTypeValue = "merge_request"
	NoteEventTargetType         EventTargetTypeValue = "note"
	ProjectEventTargetType      EventTargetTypeValue = "project"
	SnippetEventTargetType      EventTargetTypeValue = "snippet"
	UserEventTargetType         EventTargetTypeValue = "user"
)

List of available action type

GitLab API docs: https://docs.gitlab.com/ce/api/events.html#target-types

type EventType added in v0.39.1

type EventType string

EventType represents a Gitlab event type.

const (
	EventTypeBuild         EventType = "Build Hook"
	EventTypeIssue         EventType = "Issue Hook"
	EventConfidentialIssue EventType = "Confidential Issue Hook"
	EventTypeJob           EventType = "Job Hook"
	EventTypeMergeRequest  EventType = "Merge Request Hook"
	EventTypeNote          EventType = "Note Hook"
	EventConfidentialNote  EventType = "Confidential Note Hook"
	EventTypePipeline      EventType = "Pipeline Hook"
	EventTypePush          EventType = "Push Hook"
	EventTypeSystemHook    EventType = "System Hook"
	EventTypeTagPush       EventType = "Tag Push Hook"
	EventTypeWikiPage      EventType = "Wiki Page Hook"
)

List of available event types.

func HookEventType added in v0.39.1

func HookEventType(r *http.Request) EventType

HookEventType returns the event type for the given request.

func WebhookEventType added in v0.39.1

func WebhookEventType(r *http.Request) EventType

WebhookEventType returns the event type for the given request.

type EventTypeValue added in v0.8.0

type EventTypeValue string

EventTypeValue represents actions type for contribution events

const (
	CreatedEventType   EventTypeValue = "created"
	UpdatedEventType   EventTypeValue = "updated"
	ClosedEventType    EventTypeValue = "closed"
	ReopenedEventType  EventTypeValue = "reopened"
	PushedEventType    EventTypeValue = "pushed"
	CommentedEventType EventTypeValue = "commented"
	MergedEventType    EventTypeValue = "merged"
	JoinedEventType    EventTypeValue = "joined"
	LeftEventType      EventTypeValue = "left"
	DestroyedEventType EventTypeValue = "destroyed"
	ExpiredEventType   EventTypeValue = "expired"
)

List of available action type

GitLab API docs: https://docs.gitlab.com/ce/api/events.html#action-types

type EventsService added in v0.8.0

type EventsService struct {
	// contains filtered or unexported fields
}

EventsService handles communication with the event related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/events.html

func (*EventsService) ListCurrentUserContributionEvents added in v0.8.0

func (s *EventsService) ListCurrentUserContributionEvents(opt *ListContributionEventsOptions, options ...RequestOptionFunc) ([]*ContributionEvent, *Response, error)

ListCurrentUserContributionEvents gets a list currently authenticated user's events

GitLab API docs: https://docs.gitlab.com/ce/api/events.html#list-currently-authenticated-user-39-s-events

func (*EventsService) ListProjectVisibleEvents added in v0.11.0

func (s *EventsService) ListProjectVisibleEvents(pid interface{}, opt *ListContributionEventsOptions, options ...RequestOptionFunc) ([]*ContributionEvent, *Response, error)

ListProjectVisibleEvents gets a list of visible events for a particular project

GitLab API docs: https://docs.gitlab.com/ee/api/events.html#list-a-project-s-visible-events

type ExploreSnippetsOptions added in v0.7.5

type ExploreSnippetsOptions ListOptions

ExploreSnippetsOptions represents the available ExploreSnippets() options.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#explore-all-public-snippets

type ExportStatus added in v0.39.1

type ExportStatus struct {
	ID                int        `json:"id"`
	Description       string     `json:"description"`
	Name              string     `json:"name"`
	NameWithNamespace string     `json:"name_with_namespace"`
	Path              string     `json:"path"`
	PathWithNamespace string     `json:"path_with_namespace"`
	CreatedAt         *time.Time `json:"created_at"`
	ExportStatus      string     `json:"export_status"`
	Message           string     `json:"message"`
	Links             struct {
		APIURL string `json:"api_url"`
		WebURL string `json:"web_url"`
	} `json:"_links"`
}

ExportStatus represents a project export status.

GitLab API docs: https://docs.gitlab.com/ce/api/project_import_export.html#export-status

func (ExportStatus) String added in v0.39.1

func (s ExportStatus) String() string

type ExternalWikiService added in v0.39.1

type ExternalWikiService struct {
	Service
	Properties *ExternalWikiServiceProperties `json:"properties"`
}

ExternalWikiService represents External Wiki service settings.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#external-wiki

type ExternalWikiServiceProperties added in v0.39.1

type ExternalWikiServiceProperties struct {
	ExternalWikiURL string `json:"external_wiki_url"`
}

ExternalWikiServiceProperties represents External Wiki specific properties.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#external-wiki

type Feature added in v0.6.0

type Feature struct {
	Name  string `json:"name"`
	State string `json:"state"`
	Gates []Gate
}

Feature represents a GitLab feature flag.

GitLab API docs: https://docs.gitlab.com/ce/api/features.html

func (Feature) String added in v0.6.0

func (f Feature) String() string

type FeaturesService added in v0.6.0

type FeaturesService struct {
	// contains filtered or unexported fields
}

FeaturesService handles the communication with the application FeaturesService related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/features.html

func (*FeaturesService) ListFeatures added in v0.6.0

func (s *FeaturesService) ListFeatures(options ...RequestOptionFunc) ([]*Feature, *Response, error)

ListFeatures gets a list of feature flags

GitLab API docs: https://docs.gitlab.com/ce/api/features.html#list-all-features

func (*FeaturesService) SetFeatureFlag added in v0.6.0

func (s *FeaturesService) SetFeatureFlag(name string, value interface{}, options ...RequestOptionFunc) (*Feature, *Response, error)

SetFeatureFlag sets or creates a feature flag gate

GitLab API docs: https://docs.gitlab.com/ce/api/features.html#set-or-create-a-feature

type File

type File struct {
	FileName     string `json:"file_name"`
	FilePath     string `json:"file_path"`
	Size         int    `json:"size"`
	Encoding     string `json:"encoding"`
	Content      string `json:"content"`
	Ref          string `json:"ref"`
	BlobID       string `json:"blob_id"`
	CommitID     string `json:"commit_id"`
	SHA256       string `json:"content_sha256"`
	LastCommitID string `json:"last_commit_id"`
}

File represents a GitLab repository file.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html

func (File) String

func (r File) String() string

type FileAction added in v0.4.1

type FileAction string

FileAction represents the available actions that can be performed on a file.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#create-a-commit-with-multiple-files-and-actions

const (
	FileCreate FileAction = "create"
	FileDelete FileAction = "delete"
	FileMove   FileAction = "move"
	FileUpdate FileAction = "update"
)

The available file actions.

type FileBlameRange added in v0.39.1

type FileBlameRange struct {
	Commit struct {
		ID             string     `json:"id"`
		ParentIDs      []string   `json:"parent_ids"`
		Message        string     `json:"message"`
		AuthoredDate   *time.Time `json:"authored_date"`
		AuthorName     string     `json:"author_name"`
		AuthorEmail    string     `json:"author_email"`
		CommittedDate  *time.Time `json:"committed_date"`
		CommitterName  string     `json:"committer_name"`
		CommitterEmail string     `json:"committer_email"`
	} `json:"commit"`
	Lines []string `json:"lines"`
}

FileBlameRange represents one item of blame information.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html

func (FileBlameRange) String added in v0.39.1

func (b FileBlameRange) String() string

type FileInfo

type FileInfo struct {
	FilePath string `json:"file_path"`
	Branch   string `json:"branch"`
}

FileInfo represents file details of a GitLab repository file.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html

func (FileInfo) String

func (r FileInfo) String() string

type ForkParent added in v0.6.0

type ForkParent struct {
	HTTPURLToRepo     string `json:"http_url_to_repo"`
	ID                int    `json:"id"`
	Name              string `json:"name"`
	NameWithNamespace string `json:"name_with_namespace"`
	Path              string `json:"path"`
	PathWithNamespace string `json:"path_with_namespace"`
	WebURL            string `json:"web_url"`
}

ForkParent represents the parent project when this is a fork.

type ForkProjectOptions added in v0.39.1

type ForkProjectOptions struct {
	Namespace *string `url:"namespace,omitempty" json:"namespace,omitempty"`
	Name      *string `url:"name,omitempty" json:"name,omitempty" `
	Path      *string `url:"path,omitempty" json:"path,omitempty"`
}

ForkProjectOptions represents the available ForkProject() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#fork-project

type FreezePeriod added in v0.39.1

type FreezePeriod struct {
	ID           int        `json:"id"`
	FreezeStart  string     `json:"freeze_start"`
	FreezeEnd    string     `json:"freeze_end"`
	CronTimezone string     `json:"cron_timezone"`
	CreatedAt    *time.Time `json:"created_at"`
	UpdatedAt    *time.Time `json:"updated_at"`
}

FreezePeriod represents a freeze period object.

GitLab API docs: https://docs.gitlab.com/ce/api/freeze_periods.html#list-freeze-periods

type FreezePeriodsService added in v0.39.1

type FreezePeriodsService struct {
	// contains filtered or unexported fields
}

FreezePeriodsService handles the communication with the freeze periods related methods of the GitLab API.

https://docs.gitlab.com/ce/api/freeze_periods.html

func (*FreezePeriodsService) CreateFreezePeriodOptions added in v0.39.1

func (s *FreezePeriodsService) CreateFreezePeriodOptions(pid interface{}, opt *CreateFreezePeriodOptions, options ...RequestOptionFunc) (*FreezePeriod, *Response, error)

CreateFreezePeriodOptions adds a freeze period to a specified project.

GitLab API docs: https://docs.gitlab.com/ce/api/freeze_periods.html#create-a-freeze-period

func (*FreezePeriodsService) DeleteFreezePeriod added in v0.39.1

func (s *FreezePeriodsService) DeleteFreezePeriod(pid interface{}, freezePeriod int, options ...RequestOptionFunc) (*Response, error)

DeleteFreezePeriod removes a freeze period from a project. This is an idempotent method and can be called multiple times. Either the hook is available or not.

GitLab API docs: https://docs.gitlab.com/ce/api/freeze_periods.html#delete-a-freeze-period

func (*FreezePeriodsService) GetFreezePeriod added in v0.39.1

func (s *FreezePeriodsService) GetFreezePeriod(pid interface{}, freezePeriod int, options ...RequestOptionFunc) (*FreezePeriod, *Response, error)

GetFreezePeriod gets a specific freeze period for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/freeze_periods.html#get-a-freeze-period-by-a-freeze_period_id

func (*FreezePeriodsService) ListFreezePeriods added in v0.39.1

func (s *FreezePeriodsService) ListFreezePeriods(pid interface{}, opt *ListFreezePeriodsOptions, options ...RequestOptionFunc) ([]*FreezePeriod, *Response, error)

ListFreezePeriods gets a list of project project freeze periods.

GitLab API docs: https://docs.gitlab.com/ce/api/freeze_periods.html#list-freeze-periods

func (*FreezePeriodsService) UpdateFreezePeriodOptions added in v0.39.1

func (s *FreezePeriodsService) UpdateFreezePeriodOptions(pid interface{}, freezePeriod int, opt *UpdateFreezePeriodOptions, options ...RequestOptionFunc) (*FreezePeriod, *Response, error)

UpdateFreezePeriodOptions edits a freeze period for a specified project.

GitLab API docs: https://docs.gitlab.com/ce/api/freeze_periods.html#update-a-freeze-period

type GPGSignature added in v0.39.1

type GPGSignature struct {
	KeyID              int    `json:"gpg_key_id"`
	KeyPrimaryKeyID    string `json:"gpg_key_primary_keyid"`
	KeyUserName        string `json:"gpg_key_user_name"`
	KeyUserEmail       string `json:"gpg_key_user_email"`
	VerificationStatus string `json:"verification_status"`
	KeySubkeyID        int    `json:"gpg_key_subkey_id"`
}

GPGSignature represents a Gitlab commit's GPG Signature.

GitLab API docs: https://docs.gitlab.com/ee/api/commits.html#get-gpg-signature-of-a-commit

type Gate added in v0.6.0

type Gate struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

Gate represents a gate of a GitLab feature flag.

GitLab API docs: https://docs.gitlab.com/ce/api/features.html

type GetAllImpersonationTokensOptions added in v0.6.0

type GetAllImpersonationTokensOptions struct {
	ListOptions
	State *string `url:"state,omitempty" json:"state,omitempty"`
}

GetAllImpersonationTokensOptions represents the available GetAllImpersonationTokens() options.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#get-all-impersonation-tokens-of-a-user

type GetCommitCommentsOptions added in v0.8.1

type GetCommitCommentsOptions ListOptions

GetCommitCommentsOptions represents the available GetCommitComments() options.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-comments-of-a-commit

type GetCommitDiffOptions added in v0.8.1

type GetCommitDiffOptions ListOptions

GetCommitDiffOptions represents the available GetCommitDiff() options.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-diff-of-a-commit

type GetCommitRefsOptions added in v0.10.8

type GetCommitRefsOptions struct {
	ListOptions
	Type *string `url:"type,omitempty" json:"type,omitempty"`
}

GetCommitRefsOptions represents the available GetCommitRefs() options.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-references-a-commit-is-pushed-to

type GetCommitStatusesOptions

type GetCommitStatusesOptions struct {
	ListOptions
	Ref   *string `url:"ref,omitempty" json:"ref,omitempty"`
	Stage *string `url:"stage,omitempty" json:"stage,omitempty"`
	Name  *string `url:"name,omitempty" json:"name,omitempty"`
	All   *bool   `url:"all,omitempty" json:"all,omitempty"`
}

GetCommitStatusesOptions represents the available GetCommitStatuses() options.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit

type GetFileBlameOptions added in v0.39.1

type GetFileBlameOptions struct {
	Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
}

GetFileBlameOptions represents the available GetFileBlame() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#get-file-blame-from-repository

type GetFileMetaDataOptions added in v0.39.1

type GetFileMetaDataOptions struct {
	Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
}

GetFileMetaDataOptions represents the available GetFileMetaData() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-repository

type GetFileOptions

type GetFileOptions struct {
	Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
}

GetFileOptions represents the available GetFile() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-repository

type GetGroupIssuesStatisticsOptions added in v0.39.1

type GetGroupIssuesStatisticsOptions struct {
	Labels           Labels     `url:"labels,omitempty" json:"labels,omitempty"`
	IIDs             []int      `url:"iids,omitempty" json:"iids,omitempty"`
	Milestone        *Milestone `url:"milestone,omitempty" json:"milestone,omitempty"`
	Scope            *string    `url:"scope,omitempty" json:"scope,omitempty"`
	AuthorID         *int       `url:"author_id,omitempty" json:"author_id,omitempty"`
	AuthorUsername   *string    `url:"author_username,omitempty" json:"author_username,omitempty"`
	AssigneeID       *int       `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	AssigneeUsername []string   `url:"assignee_username,omitempty" json:"assignee_username,omitempty"`
	MyReactionEmoji  *string    `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"`
	Search           *string    `url:"search,omitempty" json:"search,omitempty"`
	CreatedAfter     *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	CreatedBefore    *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	UpdatedAfter     *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore    *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"`
	Confidential     *bool      `url:"confidential,omitempty" json:"confidential,omitempty"`
}

GetGroupIssuesStatisticsOptions represents the available GetGroupIssuesStatistics() options.

GitLab API docs: https://docs.gitlab.com/ee/api/issues_statistics.html#get-group-issues-statistics

type GetGroupMilestoneBurndownChartEventsOptions added in v0.39.1

type GetGroupMilestoneBurndownChartEventsOptions ListOptions

GetGroupMilestoneBurndownChartEventsOptions represents the available GetGroupMilestoneBurndownChartEventsOptions() options.

GitLab API docs: https://docs.gitlab.com/ee/api/group_milestones.html#get-all-burndown-chart-events-for-a-single-milestone-starter

type GetGroupMilestoneIssuesOptions added in v0.10.0

type GetGroupMilestoneIssuesOptions ListOptions

GetGroupMilestoneIssuesOptions represents the available GetGroupMilestoneIssues() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#get-all-issues-assigned-to-a-single-milestone

type GetGroupMilestoneMergeRequestsOptions added in v0.10.0

type GetGroupMilestoneMergeRequestsOptions ListOptions

GetGroupMilestoneMergeRequestsOptions represents the available GetGroupMilestoneMergeRequests() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#get-all-merge-requests-assigned-to-a-single-milestone

type GetIssueBoardListsOptions added in v0.8.1

type GetIssueBoardListsOptions ListOptions

GetIssueBoardListsOptions represents the available GetIssueBoardLists() options.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#list-board-lists

type GetIssuesClosedOnMergeOptions added in v0.8.1

type GetIssuesClosedOnMergeOptions ListOptions

GetIssuesClosedOnMergeOptions represents the available GetIssuesClosedOnMerge() options.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#list-issues-that-will-close-on-merge

type GetIssuesStatisticsOptions added in v0.39.1

type GetIssuesStatisticsOptions struct {
	Labels           Labels     `url:"labels,omitempty" json:"labels,omitempty"`
	Milestone        *string    `url:"milestone,omitempty" json:"milestone,omitempty"`
	Scope            *string    `url:"scope,omitempty" json:"scope,omitempty"`
	AuthorID         *int       `url:"author_id,omitempty" json:"author_id,omitempty"`
	AuthorUsername   *string    `url:"author_username,omitempty" json:"author_username,omitempty"`
	AssigneeID       *int       `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	AssigneeUsername []string   `url:"assignee_username,omitempty" json:"assignee_username,omitempty"`
	MyReactionEmoji  *string    `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"`
	IIDs             []int      `url:"iids,omitempty" json:"iids,omitempty"`
	Search           *string    `url:"search,omitempty" json:"search,omitempty"`
	In               *string    `url:"in,omitempty" json:"in,omitempty"`
	CreatedAfter     *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	CreatedBefore    *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	UpdatedAfter     *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore    *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"`
	Confidential     *bool      `url:"confidential,omitempty" json:"confidential,omitempty"`
}

GetIssuesStatisticsOptions represents the available GetIssuesStatistics() options.

GitLab API docs: https://docs.gitlab.com/ee/api/issues_statistics.html#get-issues-statistics

type GetLicenseTemplateOptions added in v0.11.1

type GetLicenseTemplateOptions struct {
	Project  *string `url:"project,omitempty" json:"project,omitempty"`
	Fullname *string `url:"fullname,omitempty" json:"fullname,omitempty"`
}

GetLicenseTemplateOptions represents the available GetLicenseTemplate() options.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/licenses.html#single-license-template

type GetMergeRequestCommitsOptions added in v0.8.1

type GetMergeRequestCommitsOptions ListOptions

GetMergeRequestCommitsOptions represents the available GetMergeRequestCommits() options.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-commits

type GetMergeRequestDiffVersionsOptions added in v0.8.1

type GetMergeRequestDiffVersionsOptions ListOptions

GetMergeRequestDiffVersionsOptions represents the available GetMergeRequestDiffVersions() options.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#get-mr-diff-versions

type GetMergeRequestsOptions added in v0.39.1

type GetMergeRequestsOptions struct {
	RenderHTML                  *bool `url:"render_html,omitempty" json:"render_html,omitempty"`
	IncludeDivergedCommitsCount *bool `url:"include_diverged_commits_count,omitempty" json:"include_diverged_commits_count,omitempty"`
	IncludeRebaseInProgress     *bool `url:"include_rebase_in_progress,omitempty" json:"include_rebase_in_progress,omitempty"`
}

GetMergeRequestsOptions represents the available GetMergeRequests() options.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr

type GetMilestoneIssuesOptions

type GetMilestoneIssuesOptions ListOptions

GetMilestoneIssuesOptions represents the available GetMilestoneIssues() options.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone

type GetMilestoneMergeRequestsOptions added in v0.10.0

type GetMilestoneMergeRequestsOptions ListOptions

GetMilestoneMergeRequestsOptions represents the available GetMilestoneMergeRequests() options.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#get-all-merge-requests-assigned-to-a-single-milestone

type GetProjectEventsOptions

type GetProjectEventsOptions ListOptions

GetProjectEventsOptions represents the available GetProjectEvents() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#get-project-events

type GetProjectIssuesStatisticsOptions added in v0.39.1

type GetProjectIssuesStatisticsOptions struct {
	IIDs             []int      `url:"iids,omitempty" json:"iids,omitempty"`
	Labels           Labels     `url:"labels,omitempty" json:"labels,omitempty"`
	Milestone        *Milestone `url:"milestone,omitempty" json:"milestone,omitempty"`
	Scope            *string    `url:"scope,omitempty" json:"scope,omitempty"`
	AuthorID         *int       `url:"author_id,omitempty" json:"author_id,omitempty"`
	AuthorUsername   *string    `url:"author_username,omitempty" json:"author_username,omitempty"`
	AssigneeID       *int       `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	AssigneeUsername []string   `url:"assignee_username,omitempty" json:"assignee_username,omitempty"`
	MyReactionEmoji  *string    `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"`
	Search           *string    `url:"search,omitempty" json:"search,omitempty"`
	CreatedAfter     *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	CreatedBefore    *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	UpdatedAfter     *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore    *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"`
	Confidential     *bool      `url:"confidential,omitempty" json:"confidential,omitempty"`
}

GetProjectIssuesStatisticsOptions represents the available GetProjectIssuesStatistics() options.

GitLab API docs: https://docs.gitlab.com/ee/api/issues_statistics.html#get-project-issues-statistics

type GetProjectOptions added in v0.39.1

type GetProjectOptions struct {
	Statistics           *bool `url:"statistics,omitempty" json:"statistics,omitempty"`
	License              *bool `url:"license,omitempty" json:"license,omitempty"`
	WithCustomAttributes *bool `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
}

GetProjectOptions represents the available GetProject() options.

GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#get-single-project

type GetRawFileOptions added in v0.6.0

type GetRawFileOptions struct {
	Ref *string `url:"ref,omitempty" json:"ref,omitempty"`
}

GetRawFileOptions represents the available GetRawFile() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#get-raw-file-from-repository

type GetUserActivitiesOptions added in v0.7.4

type GetUserActivitiesOptions struct {
	ListOptions
	From *ISOTime `url:"from,omitempty" json:"from,omitempty"`
}

GetUserActivitiesOptions represents the options for GetUserActivities

GitLap API docs: https://docs.gitlab.com/ce/api/users.html#get-user-activities-admin-only

type GetUserMembershipOptions added in v0.39.1

type GetUserMembershipOptions struct {
	ListOptions
	Type *string `url:"type,omitempty" json:"type,omitempty"`
}

GetUserMembershipOptions represents the options available to query user memberships.

GitLab API docs: https://docs.gitlab.com/ee/api/users.html#user-memberships-admin-only

type GitIgnoreTemplate added in v0.9.0

type GitIgnoreTemplate struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

GitIgnoreTemplate represents a GitLab gitignore template.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/gitignores.html

type GitIgnoreTemplatesService added in v0.9.0

type GitIgnoreTemplatesService struct {
	// contains filtered or unexported fields
}

GitIgnoreTemplatesService handles communication with the gitignore templates related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/gitignores.html

func (*GitIgnoreTemplatesService) GetTemplate added in v0.9.0

func (s *GitIgnoreTemplatesService) GetTemplate(key string, options ...RequestOptionFunc) (*GitIgnoreTemplate, *Response, error)

GetTemplate get a git ignore template

GitLab API docs: https://docs.gitlab.com/ce/api/templates/gitignores.html#single-gitignore-template

func (*GitIgnoreTemplatesService) ListTemplates added in v0.9.0

ListTemplates get a list of available git ignore templates

GitLab API docs: https://docs.gitlab.com/ce/api/templates/gitignores.html#list-gitignore-templates

type GithubService added in v0.39.1

type GithubService struct {
	Service
	Properties *GithubServiceProperties `json:"properties"`
}

GithubService represents Github service settings.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#github-premium

type GithubServiceProperties added in v0.39.1

type GithubServiceProperties struct {
	RepositoryURL string `json:"repository_url,omitempty"`
	StaticContext bool   `json:"static_context,omitempty"`
}

GithubServiceProperties represents Github specific properties.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#github-premium

type Group

type Group struct {
	ID                    int                        `json:"id"`
	Name                  string                     `json:"name"`
	Path                  string                     `json:"path"`
	Description           string                     `json:"description"`
	MembershipLock        bool                       `json:"membership_lock"`
	Visibility            VisibilityValue            `json:"visibility"`
	LFSEnabled            bool                       `json:"lfs_enabled"`
	AvatarURL             string                     `json:"avatar_url"`
	WebURL                string                     `json:"web_url"`
	RequestAccessEnabled  bool                       `json:"request_access_enabled"`
	FullName              string                     `json:"full_name"`
	FullPath              string                     `json:"full_path"`
	ParentID              int                        `json:"parent_id"`
	Projects              []*Project                 `json:"projects"`
	Statistics            *StorageStatistics         `json:"statistics"`
	CustomAttributes      []*CustomAttribute         `json:"custom_attributes"`
	ShareWithGroupLock    bool                       `json:"share_with_group_lock"`
	RequireTwoFactorAuth  bool                       `json:"require_two_factor_authentication"`
	TwoFactorGracePeriod  int                        `json:"two_factor_grace_period"`
	ProjectCreationLevel  ProjectCreationLevelValue  `json:"project_creation_level"`
	AutoDevopsEnabled     bool                       `json:"auto_devops_enabled"`
	SubGroupCreationLevel SubGroupCreationLevelValue `json:"subgroup_creation_level"`
	EmailsDisabled        bool                       `json:"emails_disabled"`
	MentionsDisabled      bool                       `json:"mentions_disabled"`
	RunnersToken          string                     `json:"runners_token"`
	SharedProjects        []*Project                 `json:"shared_projects"`
	SharedWithGroups      []struct {
		GroupID          int      `json:"group_id"`
		GroupName        string   `json:"group_name"`
		GroupFullPath    string   `json:"group_full_path"`
		GroupAccessLevel int      `json:"group_access_level"`
		ExpiresAt        *ISOTime `json:"expires_at"`
	} `json:"shared_with_groups"`
	LDAPCN                         string           `json:"ldap_cn"`
	LDAPAccess                     AccessLevelValue `json:"ldap_access"`
	LDAPGroupLinks                 []*LDAPGroupLink `json:"ldap_group_links"`
	SharedRunnersMinutesLimit      int              `json:"shared_runners_minutes_limit"`
	ExtraSharedRunnersMinutesLimit int              `json:"extra_shared_runners_minutes_limit"`
	MarkedForDeletionOn            *ISOTime         `json:"marked_for_deletion_on"`
	CreatedAt                      *time.Time       `json:"created_at"`
}

Group represents a GitLab group.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html

type GroupAccess

type GroupAccess struct {
	AccessLevel       AccessLevelValue       `json:"access_level"`
	NotificationLevel NotificationLevelValue `json:"notification_level"`
}

GroupAccess represents group access.

type GroupBadge added in v0.39.1

type GroupBadge struct {
	ID               int       `json:"id"`
	LinkURL          string    `json:"link_url"`
	ImageURL         string    `json:"image_url"`
	RenderedLinkURL  string    `json:"rendered_link_url"`
	RenderedImageURL string    `json:"rendered_image_url"`
	Kind             BadgeKind `json:"kind"`
}

GroupBadge represents a group badge.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html

type GroupBadgePreviewOptions added in v0.39.1

type GroupBadgePreviewOptions struct {
	LinkURL  *string `url:"link_url,omitempty" json:"link_url,omitempty"`
	ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"`
}

GroupBadgePreviewOptions represents the available PreviewGroupBadge() options.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html#preview-a-badge-from-a-group

type GroupBadgesService added in v0.39.1

type GroupBadgesService struct {
	// contains filtered or unexported fields
}

GroupBadgesService handles communication with the group badges

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html

func (*GroupBadgesService) AddGroupBadge added in v0.39.1

func (s *GroupBadgesService) AddGroupBadge(gid interface{}, opt *AddGroupBadgeOptions, options ...RequestOptionFunc) (*GroupBadge, *Response, error)

AddGroupBadge adds a badge to a group.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html#add-a-badge-to-a-group

func (*GroupBadgesService) DeleteGroupBadge added in v0.39.1

func (s *GroupBadgesService) DeleteGroupBadge(gid interface{}, badge int, options ...RequestOptionFunc) (*Response, error)

DeleteGroupBadge removes a badge from a group.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html#remove-a-badge-from-a-group

func (*GroupBadgesService) EditGroupBadge added in v0.39.1

func (s *GroupBadgesService) EditGroupBadge(gid interface{}, badge int, opt *EditGroupBadgeOptions, options ...RequestOptionFunc) (*GroupBadge, *Response, error)

EditGroupBadge updates a badge of a group.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html#edit-a-badge-of-a-group

func (*GroupBadgesService) GetGroupBadge added in v0.39.1

func (s *GroupBadgesService) GetGroupBadge(gid interface{}, badge int, options ...RequestOptionFunc) (*GroupBadge, *Response, error)

GetGroupBadge gets a group badge.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html#get-a-badge-of-a-group

func (*GroupBadgesService) ListGroupBadges added in v0.39.1

func (s *GroupBadgesService) ListGroupBadges(gid interface{}, opt *ListGroupBadgesOptions, options ...RequestOptionFunc) ([]*GroupBadge, *Response, error)

ListGroupBadges gets a list of a group badges.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html#list-all-badges-of-a-group

func (*GroupBadgesService) PreviewGroupBadge added in v0.39.1

func (s *GroupBadgesService) PreviewGroupBadge(gid interface{}, opt *GroupBadgePreviewOptions, options ...RequestOptionFunc) (*GroupBadge, *Response, error)

PreviewGroupBadge returns how the link_url and image_url final URLs would be after resolving the placeholder interpolation.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html#preview-a-badge-from-a-group

type GroupCluster added in v0.39.1

type GroupCluster struct {
	ID                 int                 `json:"id"`
	Name               string              `json:"name"`
	Domain             string              `json:"domain"`
	CreatedAt          *time.Time          `json:"created_at"`
	ProviderType       string              `json:"provider_type"`
	PlatformType       string              `json:"platform_type"`
	EnvironmentScope   string              `json:"environment_scope"`
	ClusterType        string              `json:"cluster_type"`
	User               *User               `json:"user"`
	PlatformKubernetes *PlatformKubernetes `json:"platform_kubernetes"`
	ManagementProject  *ManagementProject  `json:"management_project"`
	Group              *Group              `json:"group"`
}

GroupCluster represents a GitLab Group Cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/group_clusters.html

func (GroupCluster) String added in v0.39.1

func (v GroupCluster) String() string

type GroupClustersService added in v0.39.1

type GroupClustersService struct {
	// contains filtered or unexported fields
}

GroupClustersService handles communication with the group clusters related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/group_clusters.html

func (*GroupClustersService) AddCluster added in v0.39.1

func (s *GroupClustersService) AddCluster(pid interface{}, opt *AddGroupClusterOptions, options ...RequestOptionFunc) (*GroupCluster, *Response, error)

AddCluster adds an existing cluster to the group.

GitLab API docs: https://docs.gitlab.com/ee/api/group_clusters.html#add-existing-cluster-to-group

func (*GroupClustersService) DeleteCluster added in v0.39.1

func (s *GroupClustersService) DeleteCluster(pid interface{}, cluster int, options ...RequestOptionFunc) (*Response, error)

DeleteCluster deletes an existing group cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/group_clusters.html#delete-group-cluster

func (*GroupClustersService) EditCluster added in v0.39.1

func (s *GroupClustersService) EditCluster(pid interface{}, cluster int, opt *EditGroupClusterOptions, options ...RequestOptionFunc) (*GroupCluster, *Response, error)

EditCluster updates an existing group cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/group_clusters.html#edit-group-cluster

func (*GroupClustersService) GetCluster added in v0.39.1

func (s *GroupClustersService) GetCluster(pid interface{}, cluster int, options ...RequestOptionFunc) (*GroupCluster, *Response, error)

GetCluster gets a cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/group_clusters.html#get-a-single-group-cluster

func (*GroupClustersService) ListClusters added in v0.39.1

func (s *GroupClustersService) ListClusters(pid interface{}, options ...RequestOptionFunc) ([]*GroupCluster, *Response, error)

ListClusters gets a list of all clusters in a group.

GitLab API docs: https://docs.gitlab.com/ee/api/group_clusters.html#list-group-clusters

type GroupHook added in v0.39.1

type GroupHook struct {
	ID                       int        `json:"id"`
	URL                      string     `json:"url"`
	GroupID                  int        `json:"group_id"`
	PushEvents               bool       `json:"push_events"`
	IssuesEvents             bool       `json:"issues_events"`
	ConfidentialIssuesEvents bool       `json:"confidential_issues_events"`
	ConfidentialNoteEvents   bool       `json:"confidential_note_events"`
	MergeRequestsEvents      bool       `json:"merge_requests_events"`
	TagPushEvents            bool       `json:"tag_push_events"`
	NoteEvents               bool       `json:"note_events"`
	JobEvents                bool       `json:"job_events"`
	PipelineEvents           bool       `json:"pipeline_events"`
	WikiPageEvents           bool       `json:"wiki_page_events"`
	EnableSSLVerification    bool       `json:"enable_ssl_verification"`
	CreatedAt                *time.Time `json:"created_at"`
}

GroupHook represents a GitLab group hook.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-group-hooks

type GroupIssueBoard added in v0.11.0

type GroupIssueBoard struct {
	ID        int          `json:"id"`
	Name      string       `json:"name"`
	Group     *Group       `json:"group"`
	Milestone *Milestone   `json:"milestone"`
	Lists     []*BoardList `json:"lists"`
}

GroupIssueBoard represents a GitLab group issue board.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html

func (GroupIssueBoard) String added in v0.11.0

func (b GroupIssueBoard) String() string

type GroupIssueBoardsService added in v0.11.0

type GroupIssueBoardsService struct {
	// contains filtered or unexported fields
}

GroupIssueBoardsService handles communication with the group issue board related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html

func (*GroupIssueBoardsService) CreateGroupIssueBoard added in v0.39.1

func (s *GroupIssueBoardsService) CreateGroupIssueBoard(gid interface{}, opt *CreateGroupIssueBoardOptions, options ...RequestOptionFunc) (*GroupIssueBoard, *Response, error)

CreateGroupIssueBoard creates a new issue board.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#create-a-group-issue-board-premium

func (*GroupIssueBoardsService) CreateGroupIssueBoardList added in v0.11.0

func (s *GroupIssueBoardsService) CreateGroupIssueBoardList(gid interface{}, board int, opt *CreateGroupIssueBoardListOptions, options ...RequestOptionFunc) (*BoardList, *Response, error)

CreateGroupIssueBoardList creates a new issue board list.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#new-board-list

func (*GroupIssueBoardsService) DeleteGroupIssueBoardList added in v0.11.0

func (s *GroupIssueBoardsService) DeleteGroupIssueBoardList(gid interface{}, board, list int, options ...RequestOptionFunc) (*Response, error)

DeleteGroupIssueBoardList soft deletes a group issue board list. Only for admins and group owners.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#delete-a-board-list

func (*GroupIssueBoardsService) DeleteIssueBoard added in v0.39.1

func (s *GroupIssueBoardsService) DeleteIssueBoard(gid interface{}, board int, options ...RequestOptionFunc) (*Response, error)

DeleteIssueBoard delete a single issue board of a group.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#delete-a-group-issue-board-premium

func (*GroupIssueBoardsService) GetGroupIssueBoard added in v0.11.0

func (s *GroupIssueBoardsService) GetGroupIssueBoard(gid interface{}, board int, options ...RequestOptionFunc) (*GroupIssueBoard, *Response, error)

GetGroupIssueBoard gets a single issue board of a group.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#single-board

func (*GroupIssueBoardsService) GetGroupIssueBoardList added in v0.11.0

func (s *GroupIssueBoardsService) GetGroupIssueBoardList(gid interface{}, board, list int, options ...RequestOptionFunc) (*BoardList, *Response, error)

GetGroupIssueBoardList gets a single issue board list.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#single-board-list

func (*GroupIssueBoardsService) ListGroupIssueBoardLists added in v0.11.0

func (s *GroupIssueBoardsService) ListGroupIssueBoardLists(gid interface{}, board int, opt *ListGroupIssueBoardListsOptions, options ...RequestOptionFunc) ([]*BoardList, *Response, error)

ListGroupIssueBoardLists gets a list of the issue board's lists. Does not include backlog and closed lists.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#list-board-lists

func (*GroupIssueBoardsService) ListGroupIssueBoards added in v0.11.0

func (s *GroupIssueBoardsService) ListGroupIssueBoards(gid interface{}, opt *ListGroupIssueBoardsOptions, options ...RequestOptionFunc) ([]*GroupIssueBoard, *Response, error)

ListGroupIssueBoards gets a list of all issue boards in a group.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#group-board

func (*GroupIssueBoardsService) UpdateIssueBoard added in v0.39.1

func (s *GroupIssueBoardsService) UpdateIssueBoard(gid interface{}, board int, opt *UpdateGroupIssueBoardOptions, options ...RequestOptionFunc) (*GroupIssueBoard, *Response, error)

UpdateIssueBoard updates a single issue board of a group.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#update-a-group-issue-board-premium

func (*GroupIssueBoardsService) UpdateIssueBoardList added in v0.11.0

func (s *GroupIssueBoardsService) UpdateIssueBoardList(gid interface{}, board, list int, opt *UpdateGroupIssueBoardListOptions, options ...RequestOptionFunc) ([]*BoardList, *Response, error)

UpdateIssueBoardList updates the position of an existing group issue board list.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#edit-board-list

type GroupLabel added in v0.39.1

type GroupLabel Label

GroupLabel represents a GitLab group label.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html

func (GroupLabel) String added in v0.39.1

func (l GroupLabel) String() string

type GroupLabelsService added in v0.39.1

type GroupLabelsService struct {
	// contains filtered or unexported fields
}

GroupLabelsService handles communication with the label related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html

func (*GroupLabelsService) CreateGroupLabel added in v0.39.1

func (s *GroupLabelsService) CreateGroupLabel(gid interface{}, opt *CreateGroupLabelOptions, options ...RequestOptionFunc) (*GroupLabel, *Response, error)

CreateGroupLabel creates a new label for given group with given name and color.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html#create-a-new-group-label

func (*GroupLabelsService) DeleteGroupLabel added in v0.39.1

func (s *GroupLabelsService) DeleteGroupLabel(gid interface{}, opt *DeleteGroupLabelOptions, options ...RequestOptionFunc) (*Response, error)

DeleteGroupLabel deletes a group label given by its name.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label

func (*GroupLabelsService) GetGroupLabel added in v0.39.1

func (s *GroupLabelsService) GetGroupLabel(gid interface{}, labelID interface{}, options ...RequestOptionFunc) (*GroupLabel, *Response, error)

GetGroupLabel get a single label for a given group.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html#get-a-single-group-label

func (*GroupLabelsService) ListGroupLabels added in v0.39.1

func (s *GroupLabelsService) ListGroupLabels(gid interface{}, opt *ListGroupLabelsOptions, options ...RequestOptionFunc) ([]*GroupLabel, *Response, error)

ListGroupLabels gets all labels for given group.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html#list-group-labels

func (*GroupLabelsService) SubscribeToGroupLabel added in v0.39.1

func (s *GroupLabelsService) SubscribeToGroupLabel(gid interface{}, labelID interface{}, options ...RequestOptionFunc) (*GroupLabel, *Response, error)

SubscribeToGroupLabel subscribes the authenticated user to a label to receive notifications. If the user is already subscribed to the label, the status code 304 is returned.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html#subscribe-to-a-group-label

func (*GroupLabelsService) UnsubscribeFromGroupLabel added in v0.39.1

func (s *GroupLabelsService) UnsubscribeFromGroupLabel(gid interface{}, labelID interface{}, options ...RequestOptionFunc) (*Response, error)

UnsubscribeFromGroupLabel unsubscribes the authenticated user from a label to not receive notifications from it. If the user is not subscribed to the label, the status code 304 is returned.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html#unsubscribe-from-a-group-label

func (*GroupLabelsService) UpdateGroupLabel added in v0.39.1

func (s *GroupLabelsService) UpdateGroupLabel(gid interface{}, opt *UpdateGroupLabelOptions, options ...RequestOptionFunc) (*GroupLabel, *Response, error)

UpdateGroupLabel updates an existing label with new name or now color. At least one parameter is required, to update the label.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html#update-a-group-label

type GroupMember

type GroupMember struct {
	ID                int                      `json:"id"`
	Username          string                   `json:"username"`
	Name              string                   `json:"name"`
	State             string                   `json:"state"`
	AvatarURL         string                   `json:"avatar_url"`
	WebURL            string                   `json:"web_url"`
	ExpiresAt         *ISOTime                 `json:"expires_at"`
	AccessLevel       AccessLevelValue         `json:"access_level"`
	GroupSAMLIdentity *GroupMemberSAMLIdentity `json:"group_saml_identity"`
}

GroupMember represents a GitLab group member.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html

type GroupMemberSAMLIdentity added in v0.39.1

type GroupMemberSAMLIdentity struct {
	ExternUID      string `json:"extern_uid"`
	Provider       string `json:"provider"`
	SAMLProviderID int    `json:"saml_provider_id"`
}

GroupMemberSAMLIdentity represents the SAML Identity link for the group member.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project Gitlab MR for API change: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/20357 Gitlab MR for API Doc change: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25652

type GroupMembersService added in v0.7.0

type GroupMembersService struct {
	// contains filtered or unexported fields
}

GroupMembersService handles communication with the group members related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html

func (*GroupMembersService) AddGroupMember added in v0.7.0

func (s *GroupMembersService) AddGroupMember(gid interface{}, opt *AddGroupMemberOptions, options ...RequestOptionFunc) (*GroupMember, *Response, error)

AddGroupMember adds a user to the list of group members.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#add-a-member-to-a-group-or-project

func (*GroupMembersService) DeleteShareWithGroup added in v0.39.1

func (s *GroupMembersService) DeleteShareWithGroup(gid interface{}, groupID int, options ...RequestOptionFunc) (*Response, error)

DeleteShareWithGroup allows to unshare a group from a group.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#delete-link-sharing-group-with-another-group

func (*GroupMembersService) EditGroupMember added in v0.7.0

func (s *GroupMembersService) EditGroupMember(gid interface{}, user int, opt *EditGroupMemberOptions, options ...RequestOptionFunc) (*GroupMember, *Response, error)

EditGroupMember updates a member of a group.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#edit-a-member-of-a-group-or-project

func (*GroupMembersService) GetGroupMember added in v0.7.0

func (s *GroupMembersService) GetGroupMember(gid interface{}, user int, options ...RequestOptionFunc) (*GroupMember, *Response, error)

GetGroupMember gets a member of a group.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#get-a-member-of-a-group-or-project

func (*GroupMembersService) RemoveGroupMember added in v0.7.0

func (s *GroupMembersService) RemoveGroupMember(gid interface{}, user int, options ...RequestOptionFunc) (*Response, error)

RemoveGroupMember removes user from user team.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#remove-a-member-from-a-group-or-project

func (*GroupMembersService) ShareWithGroup added in v0.39.1

func (s *GroupMembersService) ShareWithGroup(gid interface{}, opt *ShareWithGroupOptions, options ...RequestOptionFunc) (*Group, *Response, error)

ShareWithGroup shares a group with the group.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#share-groups-with-groups

type GroupMilestone added in v0.10.0

type GroupMilestone struct {
	ID          int        `json:"id"`
	IID         int        `json:"iid"`
	GroupID     int        `json:"group_id"`
	Title       string     `json:"title"`
	Description string     `json:"description"`
	StartDate   *ISOTime   `json:"start_date"`
	DueDate     *ISOTime   `json:"due_date"`
	State       string     `json:"state"`
	UpdatedAt   *time.Time `json:"updated_at"`
	CreatedAt   *time.Time `json:"created_at"`
	Expired     *bool      `json:"expired"`
}

GroupMilestone represents a GitLab milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html

func (GroupMilestone) String added in v0.10.0

func (m GroupMilestone) String() string

type GroupMilestonesService added in v0.10.0

type GroupMilestonesService struct {
	// contains filtered or unexported fields
}

GroupMilestonesService handles communication with the milestone related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html

func (*GroupMilestonesService) CreateGroupMilestone added in v0.10.0

func (s *GroupMilestonesService) CreateGroupMilestone(gid interface{}, opt *CreateGroupMilestoneOptions, options ...RequestOptionFunc) (*GroupMilestone, *Response, error)

CreateGroupMilestone creates a new group milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#create-new-milestone

func (*GroupMilestonesService) GetGroupMilestone added in v0.10.0

func (s *GroupMilestonesService) GetGroupMilestone(gid interface{}, milestone int, options ...RequestOptionFunc) (*GroupMilestone, *Response, error)

GetGroupMilestone gets a single group milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#get-single-milestone

func (*GroupMilestonesService) GetGroupMilestoneBurndownChartEvents added in v0.39.1

func (s *GroupMilestonesService) GetGroupMilestoneBurndownChartEvents(gid interface{}, milestone int, opt *GetGroupMilestoneBurndownChartEventsOptions, options ...RequestOptionFunc) ([]*BurndownChartEvent, *Response, error)

GetGroupMilestoneBurndownChartEvents gets all merge requests assigned to a single group milestone.

GitLab API docs: https://docs.gitlab.com/ee/api/group_milestones.html#get-all-burndown-chart-events-for-a-single-milestone-starter

func (*GroupMilestonesService) GetGroupMilestoneIssues added in v0.10.0

func (s *GroupMilestonesService) GetGroupMilestoneIssues(gid interface{}, milestone int, opt *GetGroupMilestoneIssuesOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

GetGroupMilestoneIssues gets all issues assigned to a single group milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#get-all-issues-assigned-to-a-single-milestone

func (*GroupMilestonesService) GetGroupMilestoneMergeRequests added in v0.10.0

func (s *GroupMilestonesService) GetGroupMilestoneMergeRequests(gid interface{}, milestone int, opt *GetGroupMilestoneMergeRequestsOptions, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

GetGroupMilestoneMergeRequests gets all merge requests assigned to a single group milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#get-all-merge-requests-assigned-to-a-single-milestone

func (*GroupMilestonesService) ListGroupMilestones added in v0.10.0

func (s *GroupMilestonesService) ListGroupMilestones(gid interface{}, opt *ListGroupMilestonesOptions, options ...RequestOptionFunc) ([]*GroupMilestone, *Response, error)

ListGroupMilestones returns a list of group milestones.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#list-group-milestones

func (*GroupMilestonesService) UpdateGroupMilestone added in v0.10.0

func (s *GroupMilestonesService) UpdateGroupMilestone(gid interface{}, milestone int, opt *UpdateGroupMilestoneOptions, options ...RequestOptionFunc) (*GroupMilestone, *Response, error)

UpdateGroupMilestone updates an existing group milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#edit-milestone

type GroupPushRules added in v0.39.1

type GroupPushRules struct {
	ID                         int        `json:"id"`
	CreatedAt                  *time.Time `json:"created_at"`
	CommitMessageRegex         string     `json:"commit_message_regex"`
	CommitMessageNegativeRegex string     `json:"commit_message_negative_regex"`
	BranchNameRegex            string     `json:"branch_name_regex"`
	DenyDeleteTag              bool       `json:"deny_delete_tag"`
	MemberCheck                bool       `json:"member_check"`
	PreventSecrets             bool       `json:"prevent_secrets"`
	AuthorEmailRegex           string     `json:"author_email_regex"`
	FileNameRegex              string     `json:"file_name_regex"`
	MaxFileSize                int        `json:"max_file_size"`
	CommitCommitterCheck       bool       `json:"commit_committer_check"`
	RejectUnsignedCommits      bool       `json:"reject_unsigned_commits"`
}

GroupPushRules represents a group push rule.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#get-group-push-rules

type GroupSystemEvent added in v0.39.1

type GroupSystemEvent struct {
	BaseSystemEvent
	Name                 string `json:"name"`
	Path                 string `json:"path"`
	PathWithNamespace    string `json:"full_path"`
	GroupID              int    `json:"group_id"`
	OwnerName            string `json:"owner_name"`
	OwnerEmail           string `json:"owner_email"`
	ProjectVisibility    string `json:"project_visibility"`
	OldPath              string `json:"old_path,omitempty"`
	OldPathWithNamespace string `json:"old_full_path,omitempty"`
}

GroupSystemEvent represents a group system event.

GitLab API docs: https://docs.gitlab.com/ee/system_hooks/system_hooks.html

type GroupVariable added in v0.11.0

type GroupVariable struct {
	Key          string            `json:"key"`
	Value        string            `json:"value"`
	VariableType VariableTypeValue `json:"variable_type"`
	Protected    bool              `json:"protected"`
	Masked       bool              `json:"masked"`
}

GroupVariable represents a GitLab group Variable.

GitLab API docs: https://docs.gitlab.com/ee/api/group_level_variables.html

func (GroupVariable) String added in v0.11.0

func (v GroupVariable) String() string

type GroupVariablesService added in v0.11.0

type GroupVariablesService struct {
	// contains filtered or unexported fields
}

GroupVariablesService handles communication with the group variables related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/group_level_variables.html

func (*GroupVariablesService) CreateVariable added in v0.11.0

func (s *GroupVariablesService) CreateVariable(gid interface{}, opt *CreateGroupVariableOptions, options ...RequestOptionFunc) (*GroupVariable, *Response, error)

CreateVariable creates a new group variable.

GitLab API docs: https://docs.gitlab.com/ee/api/group_level_variables.html#create-variable

func (*GroupVariablesService) GetVariable added in v0.11.0

func (s *GroupVariablesService) GetVariable(gid interface{}, key string, options ...RequestOptionFunc) (*GroupVariable, *Response, error)

GetVariable gets a variable.

GitLab API docs: https://docs.gitlab.com/ee/api/group_level_variables.html#show-variable-details

func (*GroupVariablesService) ListVariables added in v0.11.0

func (s *GroupVariablesService) ListVariables(gid interface{}, opt *ListGroupVariablesOptions, options ...RequestOptionFunc) ([]*GroupVariable, *Response, error)

ListVariables gets a list of all variables for a group.

GitLab API docs: https://docs.gitlab.com/ee/api/group_level_variables.html#list-group-variables

func (*GroupVariablesService) RemoveVariable added in v0.11.0

func (s *GroupVariablesService) RemoveVariable(gid interface{}, key string, options ...RequestOptionFunc) (*Response, error)

RemoveVariable removes a group's variable.

GitLab API docs: https://docs.gitlab.com/ee/api/group_level_variables.html#remove-variable

func (*GroupVariablesService) UpdateVariable added in v0.11.0

func (s *GroupVariablesService) UpdateVariable(gid interface{}, key string, opt *UpdateGroupVariableOptions, options ...RequestOptionFunc) (*GroupVariable, *Response, error)

UpdateVariable updates the position of an existing group issue board list.

GitLab API docs: https://docs.gitlab.com/ee/api/group_level_variables.html#update-variable

type GroupsService

type GroupsService struct {
	// contains filtered or unexported fields
}

GroupsService handles communication with the group related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html

func (*GroupsService) AddGroupHook added in v0.39.1

func (s *GroupsService) AddGroupHook(gid interface{}, opt *AddGroupHookOptions, options ...RequestOptionFunc) (*GroupHook, *Response, error)

AddGroupHook create a new group scoped webhook.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#add-group-hook

func (s *GroupsService) AddGroupLDAPLink(gid interface{}, opt *AddGroupLDAPLinkOptions, options ...RequestOptionFunc) (*LDAPGroupLink, *Response, error)

AddGroupLDAPLink creates a new group LDAP link. Available only for users who can edit groups.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#add-ldap-group-link-starter

func (*GroupsService) AddGroupPushRule added in v0.39.1

func (s *GroupsService) AddGroupPushRule(gid interface{}, opt *AddGroupPushRuleOptions, options ...RequestOptionFunc) (*GroupPushRules, *Response, error)

AddGroupPushRule adds push rules to the specified group.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#add-group-push-rule

func (*GroupsService) CreateGroup

func (s *GroupsService) CreateGroup(opt *CreateGroupOptions, options ...RequestOptionFunc) (*Group, *Response, error)

CreateGroup creates a new project group. Available only for users who can create groups.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#new-group

func (*GroupsService) DeleteGroup

func (s *GroupsService) DeleteGroup(gid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteGroup removes group with all projects inside.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#remove-group

func (*GroupsService) DeleteGroupHook added in v0.39.1

func (s *GroupsService) DeleteGroupHook(pid interface{}, hook int, options ...RequestOptionFunc) (*Response, error)

DeleteGroupHook removes a hook from a group. This is an idempotent method and can be called multiple times.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#delete-group-hook

func (s *GroupsService) DeleteGroupLDAPLink(gid interface{}, cn string, options ...RequestOptionFunc) (*Response, error)

DeleteGroupLDAPLink deletes a group LDAP link. Available only for users who can edit groups.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#delete-ldap-group-link-starter

func (*GroupsService) DeleteGroupLDAPLinkForProvider added in v0.39.1

func (s *GroupsService) DeleteGroupLDAPLinkForProvider(gid interface{}, provider, cn string, options ...RequestOptionFunc) (*Response, error)

DeleteGroupLDAPLinkForProvider deletes a group LDAP link from a specific provider. Available only for users who can edit groups.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#delete-ldap-group-link-starter

func (*GroupsService) DeleteGroupPushRule added in v0.39.1

func (s *GroupsService) DeleteGroupPushRule(gid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteGroupPushRule deletes the push rules of a group.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#delete-group-push-rule

func (*GroupsService) EditGroupHook added in v0.39.1

func (s *GroupsService) EditGroupHook(pid interface{}, hook int, opt *EditGroupHookOptions, options ...RequestOptionFunc) (*GroupHook, *Response, error)

EditGroupHook edits a hook for a specified group.

Gitlab API docs: https://docs.gitlab.com/ce/api/groups.html#edit-group-hook

func (*GroupsService) EditGroupPushRule added in v0.39.1

func (s *GroupsService) EditGroupPushRule(gid interface{}, opt *EditGroupPushRuleOptions, options ...RequestOptionFunc) (*GroupPushRules, *Response, error)

EditGroupPushRule edits a push rule for a specified group.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#edit-group-push-rule

func (*GroupsService) GetGroup

func (s *GroupsService) GetGroup(gid interface{}, options ...RequestOptionFunc) (*Group, *Response, error)

GetGroup gets all details of a group.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#details-of-a-group

func (*GroupsService) GetGroupHook added in v0.39.1

func (s *GroupsService) GetGroupHook(pid interface{}, hook int, options ...RequestOptionFunc) (*GroupHook, *Response, error)

GetGroupHook gets a specific hook for a group.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#get-group-hook

func (*GroupsService) GetGroupPushRules added in v0.39.1

func (s *GroupsService) GetGroupPushRules(gid interface{}, options ...RequestOptionFunc) (*GroupPushRules, *Response, error)

GetGroupPushRules gets the push rules of a group.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#get-group-push-rules

func (*GroupsService) ListAllGroupMembers added in v0.11.2

func (s *GroupsService) ListAllGroupMembers(gid interface{}, opt *ListGroupMembersOptions, options ...RequestOptionFunc) ([]*GroupMember, *Response, error)

ListAllGroupMembers get a list of group members viewable by the authenticated user. Returns a list including inherited members through ancestor groups.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project-including-inherited-members

func (*GroupsService) ListDescendantGroups added in v0.39.1

func (s *GroupsService) ListDescendantGroups(gid interface{}, opt *ListDescendantGroupsOptions, options ...RequestOptionFunc) ([]*Group, *Response, error)

ListDescendantGroups gets a list of subgroups for a given project.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-a-groups-descendant-groups

func (*GroupsService) ListGroupHooks added in v0.39.1

func (s *GroupsService) ListGroupHooks(gid interface{}) ([]*GroupHook, *Response, error)

ListGroupHooks gets a list of group hooks.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-group-hooks

func (s *GroupsService) ListGroupLDAPLinks(gid interface{}, options ...RequestOptionFunc) ([]*LDAPGroupLink, *Response, error)

ListGroupLDAPLinks lists the group's LDAP links. Available only for users who can edit groups.

GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#list-ldap-group-links-starter

func (*GroupsService) ListGroupMembers

func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersOptions, options ...RequestOptionFunc) ([]*GroupMember, *Response, error)

ListGroupMembers get a list of group members viewable by the authenticated user. Inherited members through ancestor groups are not included.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project

func (*GroupsService) ListGroupProjects added in v0.4.0

func (s *GroupsService) ListGroupProjects(gid interface{}, opt *ListGroupProjectsOptions, options ...RequestOptionFunc) ([]*Project, *Response, error)

ListGroupProjects get a list of group projects

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-a-group-39-s-projects

func (*GroupsService) ListGroups

func (s *GroupsService) ListGroups(opt *ListGroupsOptions, options ...RequestOptionFunc) ([]*Group, *Response, error)

ListGroups gets a list of groups (as user: my groups, as admin: all groups).

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-project-groups

func (*GroupsService) ListSubgroups added in v0.7.5

func (s *GroupsService) ListSubgroups(gid interface{}, opt *ListSubgroupsOptions, options ...RequestOptionFunc) ([]*Group, *Response, error)

ListSubgroups gets a list of subgroups for a given project.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-a-groups-s-subgroups

func (*GroupsService) SearchGroup

func (s *GroupsService) SearchGroup(query string, options ...RequestOptionFunc) ([]*Group, *Response, error)

SearchGroup get all groups that match your string in their name or path.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#search-for-group

func (*GroupsService) TransferGroup

func (s *GroupsService) TransferGroup(gid interface{}, pid interface{}, options ...RequestOptionFunc) (*Group, *Response, error)

TransferGroup transfers a project to the Group namespace. Available only for admin.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#transfer-project-to-group

func (*GroupsService) UpdateGroup added in v0.6.0

func (s *GroupsService) UpdateGroup(gid interface{}, opt *UpdateGroupOptions, options ...RequestOptionFunc) (*Group, *Response, error)

UpdateGroup updates an existing group; only available to group owners and administrators.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#update-group

type Hook

type Hook struct {
	ID        int        `json:"id"`
	URL       string     `json:"url"`
	CreatedAt *time.Time `json:"created_at"`
}

Hook represents a GitLap system hook.

GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html

func (Hook) String

func (h Hook) String() string

type HookEvent

type HookEvent struct {
	EventName  string `json:"event_name"`
	Name       string `json:"name"`
	Path       string `json:"path"`
	ProjectID  int    `json:"project_id"`
	OwnerName  string `json:"owner_name"`
	OwnerEmail string `json:"owner_email"`
}

HookEvent represents an event trigger by a GitLab system hook.

GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html

func (HookEvent) String

func (h HookEvent) String() string

type ISOTime added in v0.7.2

type ISOTime time.Time

ISOTime represents an ISO 8601 formatted date

func (*ISOTime) EncodeValues added in v0.39.1

func (t *ISOTime) EncodeValues(key string, v *url.Values) error

EncodeValues implements the query.Encoder interface

func (ISOTime) MarshalJSON added in v0.7.2

func (t ISOTime) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface

func (ISOTime) String added in v0.9.0

func (t ISOTime) String() string

String implements the Stringer interface

func (*ISOTime) UnmarshalJSON added in v0.7.2

func (t *ISOTime) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface

type ImpersonationToken added in v0.6.0

type ImpersonationToken struct {
	ID        int        `json:"id"`
	Name      string     `json:"name"`
	Active    bool       `json:"active"`
	Token     string     `json:"token"`
	Scopes    []string   `json:"scopes"`
	Revoked   bool       `json:"revoked"`
	CreatedAt *time.Time `json:"created_at"`
	ExpiresAt *ISOTime   `json:"expires_at"`
}

ImpersonationToken represents an impersonation token.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#get-all-impersonation-tokens-of-a-user

type ImportFileOptions added in v0.39.1

type ImportFileOptions struct {
	Namespace      *string               `url:"namespace,omitempty" json:"namespace,omitempty"`
	File           *string               `url:"file,omitempty" json:"file,omitempty"`
	Path           *string               `url:"path,omitempty" json:"path,omitempty"`
	Overwrite      *bool                 `url:"overwrite,omitempty" json:"overwrite,omitempty"`
	OverrideParams *CreateProjectOptions `url:"override_params,omitempty" json:"override_params,omitempty"`
}

ImportFileOptions represents the available ImportFile() options.

GitLab API docs: https://docs.gitlab.com/ce/api/project_import_export.html#import-a-file

type ImportStatus added in v0.39.1

type ImportStatus struct {
	ID                int        `json:"id"`
	Description       string     `json:"description"`
	Name              string     `json:"name"`
	NameWithNamespace string     `json:"name_with_namespace"`
	Path              string     `json:"path"`
	PathWithNamespace string     `json:"path_with_namespace"`
	CreateAt          *time.Time `json:"create_at"`
	ImportStatus      string     `json:"import_status"`
}

ImportStatus represents a project import status.

GitLab API docs: https://docs.gitlab.com/ce/api/project_import_export.html#import-status

func (ImportStatus) String added in v0.39.1

func (s ImportStatus) String() string

type InstanceCluster added in v0.39.1

type InstanceCluster struct {
	ID                 int                 `json:"id"`
	Name               string              `json:"name"`
	Domain             string              `json:"domain"`
	Managed            bool                `json:"managed"`
	CreatedAt          *time.Time          `json:"created_at"`
	ProviderType       string              `json:"provider_type"`
	PlatformType       string              `json:"platform_type"`
	EnvironmentScope   string              `json:"environment_scope"`
	ClusterType        string              `json:"cluster_type"`
	User               *User               `json:"user"`
	PlatformKubernetes *PlatformKubernetes `json:"platform_kubernetes"`
	ManagementProject  *ManagementProject  `json:"management_project"`
}

InstanceCluster represents a GitLab Instance Cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_clusters.html

func (InstanceCluster) String added in v0.39.1

func (v InstanceCluster) String() string

type InstanceClustersService added in v0.39.1

type InstanceClustersService struct {
	// contains filtered or unexported fields
}

InstanceClustersService handles communication with the instance clusters related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_clusters.html

func (*InstanceClustersService) AddCluster added in v0.39.1

AddCluster adds an existing cluster to the instance.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_clusters.html#add-existing-instance-cluster

func (*InstanceClustersService) DeleteCluster added in v0.39.1

func (s *InstanceClustersService) DeleteCluster(cluster int, options ...RequestOptionFunc) (*Response, error)

DeleteCluster deletes an existing instance cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_clusters.html#delete-instance-cluster

func (*InstanceClustersService) EditCluster added in v0.39.1

func (s *InstanceClustersService) EditCluster(cluster int, opt *EditClusterOptions, options ...RequestOptionFunc) (*InstanceCluster, *Response, error)

EditCluster updates an existing instance cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_clusters.html#edit-instance-cluster

func (*InstanceClustersService) GetCluster added in v0.39.1

func (s *InstanceClustersService) GetCluster(cluster int, options ...RequestOptionFunc) (*InstanceCluster, *Response, error)

GetCluster gets an instance cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_clusters.html#get-a-single-instance-cluster

func (*InstanceClustersService) ListClusters added in v0.39.1

func (s *InstanceClustersService) ListClusters(options ...RequestOptionFunc) ([]*InstanceCluster, *Response, error)

ListClusters gets a list of all instance clusters.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_clusters.html#list-instance-clusters

type InstanceVariable added in v0.39.1

type InstanceVariable struct {
	Key          string            `json:"key"`
	Value        string            `json:"value"`
	VariableType VariableTypeValue `json:"variable_type"`
	Protected    bool              `json:"protected"`
	Masked       bool              `json:"masked"`
}

InstanceVariable represents a GitLab instance level CI Variable.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_level_ci_variables.html

func (InstanceVariable) String added in v0.39.1

func (v InstanceVariable) String() string

type InstanceVariablesService added in v0.39.1

type InstanceVariablesService struct {
	// contains filtered or unexported fields
}

InstanceVariablesService handles communication with the instance level CI variables related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_level_ci_variables.html

func (*InstanceVariablesService) CreateVariable added in v0.39.1

CreateVariable creates a new instance level CI variable.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_level_ci_variables.html#create-instance-variable

func (*InstanceVariablesService) GetVariable added in v0.39.1

func (s *InstanceVariablesService) GetVariable(key string, options ...RequestOptionFunc) (*InstanceVariable, *Response, error)

GetVariable gets a variable.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_level_ci_variables.html#show-instance-variable-details

func (*InstanceVariablesService) ListVariables added in v0.39.1

ListVariables gets a list of all variables for an instance.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_level_ci_variables.html#list-all-instance-variables

func (*InstanceVariablesService) RemoveVariable added in v0.39.1

func (s *InstanceVariablesService) RemoveVariable(key string, options ...RequestOptionFunc) (*Response, error)

RemoveVariable removes an instance level CI variable.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_level_ci_variables.html#remove-instance-variable

func (*InstanceVariablesService) UpdateVariable added in v0.39.1

UpdateVariable updates the position of an existing instance level CI variable.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_level_ci_variables.html#update-instance-variable

type Issue

type Issue struct {
	ID                   int              `json:"id"`
	IID                  int              `json:"iid"`
	State                string           `json:"state"`
	Description          string           `json:"description"`
	Author               *IssueAuthor     `json:"author"`
	Milestone            *Milestone       `json:"milestone"`
	ProjectID            int              `json:"project_id"`
	Assignees            []*IssueAssignee `json:"assignees"`
	Assignee             *IssueAssignee   `json:"assignee"`
	UpdatedAt            *time.Time       `json:"updated_at"`
	ClosedAt             *time.Time       `json:"closed_at"`
	ClosedBy             *IssueCloser     `json:"closed_by"`
	Title                string           `json:"title"`
	CreatedAt            *time.Time       `json:"created_at"`
	Labels               Labels           `json:"labels"`
	LabelDetails         []*LabelDetails  `json:"label_details"`
	Upvotes              int              `json:"upvotes"`
	Downvotes            int              `json:"downvotes"`
	DueDate              *ISOTime         `json:"due_date"`
	WebURL               string           `json:"web_url"`
	References           *IssueReferences `json:"references"`
	TimeStats            *TimeStats       `json:"time_stats"`
	Confidential         bool             `json:"confidential"`
	Weight               int              `json:"weight"`
	DiscussionLocked     bool             `json:"discussion_locked"`
	Subscribed           bool             `json:"subscribed"`
	UserNotesCount       int              `json:"user_notes_count"`
	Links                *IssueLinks      `json:"_links"`
	IssueLinkID          int              `json:"issue_link_id"`
	MergeRequestCount    int              `json:"merge_requests_count"`
	EpicIssueID          int              `json:"epic_issue_id"`
	Epic                 *Epic            `json:"epic"`
	TaskCompletionStatus struct {
		Count          int `json:"count"`
		CompletedCount int `json:"completed_count"`
	} `json:"task_completion_status"`
}

Issue represents a GitLab issue.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html

func (Issue) String

func (i Issue) String() string

func (*Issue) UnmarshalJSON added in v0.39.1

func (i *Issue) UnmarshalJSON(data []byte) error

type IssueAssignee added in v0.39.1

type IssueAssignee struct {
	ID        int    `json:"id"`
	State     string `json:"state"`
	WebURL    string `json:"web_url"`
	Name      string `json:"name"`
	AvatarURL string `json:"avatar_url"`
	Username  string `json:"username"`
}

IssueAssignee represents a assignee of the issue.

type IssueAuthor added in v0.39.1

type IssueAuthor struct {
	ID        int    `json:"id"`
	State     string `json:"state"`
	WebURL    string `json:"web_url"`
	Name      string `json:"name"`
	AvatarURL string `json:"avatar_url"`
	Username  string `json:"username"`
}

IssueAuthor represents a author of the issue.

type IssueBoard added in v0.8.0

type IssueBoard struct {
	ID        int          `json:"id"`
	Name      string       `json:"name"`
	Project   *Project     `json:"project"`
	Milestone *Milestone   `json:"milestone"`
	Lists     []*BoardList `json:"lists"`
}

IssueBoard represents a GitLab issue board.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html

func (IssueBoard) String added in v0.8.0

func (b IssueBoard) String() string

type IssueBoardsService added in v0.8.0

type IssueBoardsService struct {
	// contains filtered or unexported fields
}

IssueBoardsService handles communication with the issue board related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html

func (*IssueBoardsService) CreateIssueBoard added in v0.39.1

func (s *IssueBoardsService) CreateIssueBoard(pid interface{}, opt *CreateIssueBoardOptions, options ...RequestOptionFunc) (*IssueBoard, *Response, error)

CreateIssueBoard creates a new issue board.

GitLab API docs: https://docs.gitlab.com/ee/api/boards.html#create-a-board-starter

func (*IssueBoardsService) CreateIssueBoardList added in v0.8.0

func (s *IssueBoardsService) CreateIssueBoardList(pid interface{}, board int, opt *CreateIssueBoardListOptions, options ...RequestOptionFunc) (*BoardList, *Response, error)

CreateIssueBoardList creates a new issue board list.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#new-board-list

func (*IssueBoardsService) DeleteIssueBoard added in v0.39.1

func (s *IssueBoardsService) DeleteIssueBoard(pid interface{}, board int, options ...RequestOptionFunc) (*Response, error)

DeleteIssueBoard deletes an issue board.

GitLab API docs: https://docs.gitlab.com/ee/api/boards.html#delete-a-board-starter

func (*IssueBoardsService) DeleteIssueBoardList added in v0.8.0

func (s *IssueBoardsService) DeleteIssueBoardList(pid interface{}, board, list int, options ...RequestOptionFunc) (*Response, error)

DeleteIssueBoardList soft deletes an issue board list. Only for admins and project owners.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#delete-a-board-list

func (*IssueBoardsService) GetIssueBoard added in v0.8.0

func (s *IssueBoardsService) GetIssueBoard(pid interface{}, board int, options ...RequestOptionFunc) (*IssueBoard, *Response, error)

GetIssueBoard gets a single issue board of a project.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#single-board

func (*IssueBoardsService) GetIssueBoardList added in v0.8.0

func (s *IssueBoardsService) GetIssueBoardList(pid interface{}, board, list int, options ...RequestOptionFunc) (*BoardList, *Response, error)

GetIssueBoardList gets a single issue board list.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#single-board-list

func (*IssueBoardsService) GetIssueBoardLists added in v0.8.0

func (s *IssueBoardsService) GetIssueBoardLists(pid interface{}, board int, opt *GetIssueBoardListsOptions, options ...RequestOptionFunc) ([]*BoardList, *Response, error)

GetIssueBoardLists gets a list of the issue board's lists. Does not include backlog and closed lists.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#list-board-lists

func (*IssueBoardsService) ListIssueBoards added in v0.8.0

func (s *IssueBoardsService) ListIssueBoards(pid interface{}, opt *ListIssueBoardsOptions, options ...RequestOptionFunc) ([]*IssueBoard, *Response, error)

ListIssueBoards gets a list of all issue boards in a project.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#project-board

func (*IssueBoardsService) UpdateIssueBoard added in v0.39.1

func (s *IssueBoardsService) UpdateIssueBoard(pid interface{}, board int, opt *UpdateIssueBoardOptions, options ...RequestOptionFunc) (*IssueBoard, *Response, error)

UpdateIssueBoard update an issue board.

GitLab API docs: https://docs.gitlab.com/ee/api/boards.html#create-a-board-starter

func (*IssueBoardsService) UpdateIssueBoardList added in v0.8.0

func (s *IssueBoardsService) UpdateIssueBoardList(pid interface{}, board, list int, opt *UpdateIssueBoardListOptions, options ...RequestOptionFunc) (*BoardList, *Response, error)

UpdateIssueBoardList updates the position of an existing issue board list.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#edit-board-list

type IssueCloser added in v0.39.1

type IssueCloser struct {
	ID        int    `json:"id"`
	State     string `json:"state"`
	WebURL    string `json:"web_url"`
	Name      string `json:"name"`
	AvatarURL string `json:"avatar_url"`
	Username  string `json:"username"`
}

IssueCloser represents a closer of the issue.

type IssueCommentEvent added in v0.3.1

type IssueCommentEvent struct {
	ObjectKind string `json:"object_kind"`
	User       *User  `json:"user"`
	ProjectID  int    `json:"project_id"`
	Project    struct {
		Name              string          `json:"name"`
		Description       string          `json:"description"`
		AvatarURL         string          `json:"avatar_url"`
		GitSSHURL         string          `json:"git_ssh_url"`
		GitHTTPURL        string          `json:"git_http_url"`
		Namespace         string          `json:"namespace"`
		PathWithNamespace string          `json:"path_with_namespace"`
		DefaultBranch     string          `json:"default_branch"`
		Homepage          string          `json:"homepage"`
		URL               string          `json:"url"`
		SSHURL            string          `json:"ssh_url"`
		HTTPURL           string          `json:"http_url"`
		WebURL            string          `json:"web_url"`
		Visibility        VisibilityValue `json:"visibility"`
	} `json:"project"`
	Repository       *Repository `json:"repository"`
	ObjectAttributes struct {
		ID           int     `json:"id"`
		Note         string  `json:"note"`
		NoteableType string  `json:"noteable_type"`
		AuthorID     int     `json:"author_id"`
		CreatedAt    string  `json:"created_at"`
		UpdatedAt    string  `json:"updated_at"`
		ProjectID    int     `json:"project_id"`
		Attachment   string  `json:"attachment"`
		LineCode     string  `json:"line_code"`
		CommitID     string  `json:"commit_id"`
		NoteableID   int     `json:"noteable_id"`
		System       bool    `json:"system"`
		StDiff       []*Diff `json:"st_diff"`
		URL          string  `json:"url"`
	} `json:"object_attributes"`
	Issue struct {
		ID                  int      `json:"id"`
		IID                 int      `json:"iid"`
		ProjectID           int      `json:"project_id"`
		MilestoneID         int      `json:"milestone_id"`
		AuthorID            int      `json:"author_id"`
		Description         string   `json:"description"`
		State               string   `json:"state"`
		Title               string   `json:"title"`
		LastEditedAt        string   `json:"last_edit_at"`
		LastEditedByID      int      `json:"last_edited_by_id"`
		UpdatedAt           string   `json:"updated_at"`
		UpdatedByID         int      `json:"updated_by_id"`
		CreatedAt           string   `json:"created_at"`
		ClosedAt            string   `json:"closed_at"`
		DueDate             *ISOTime `json:"due_date"`
		URL                 string   `json:"url"`
		TimeEstimate        int      `json:"time_estimate"`
		Confidential        bool     `json:"confidential"`
		TotalTimeSpent      int      `json:"total_time_spent"`
		HumanTotalTimeSpent string   `json:"human_total_time_spent"`
		HumanTimeEstimate   string   `json:"human_time_estimate"`
		AssigneeIDs         []int    `json:"assignee_ids"`
		AssigneeID          int      `json:"assignee_id"`
	} `json:"issue"`
}

IssueCommentEvent represents a comment on an issue event.

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#comment-on-issue

type IssueEvent added in v0.3.1

type IssueEvent struct {
	ObjectKind string `json:"object_kind"`
	User       *User  `json:"user"`
	Project    struct {
		ID                int             `json:"id"`
		Name              string          `json:"name"`
		Description       string          `json:"description"`
		AvatarURL         string          `json:"avatar_url"`
		GitSSHURL         string          `json:"git_ssh_url"`
		GitHTTPURL        string          `json:"git_http_url"`
		Namespace         string          `json:"namespace"`
		PathWithNamespace string          `json:"path_with_namespace"`
		DefaultBranch     string          `json:"default_branch"`
		Homepage          string          `json:"homepage"`
		URL               string          `json:"url"`
		SSHURL            string          `json:"ssh_url"`
		HTTPURL           string          `json:"http_url"`
		WebURL            string          `json:"web_url"`
		Visibility        VisibilityValue `json:"visibility"`
	} `json:"project"`
	Repository       *Repository `json:"repository"`
	ObjectAttributes struct {
		ID          int    `json:"id"`
		Title       string `json:"title"`
		AssigneeID  int    `json:"assignee_id"`
		AuthorID    int    `json:"author_id"`
		ProjectID   int    `json:"project_id"`
		CreatedAt   string `json:"created_at"` // Should be *time.Time (see Gitlab issue #21468)
		UpdatedAt   string `json:"updated_at"` // Should be *time.Time (see Gitlab issue #21468)
		Position    int    `json:"position"`
		BranchName  string `json:"branch_name"`
		Description string `json:"description"`
		MilestoneID int    `json:"milestone_id"`
		State       string `json:"state"`
		IID         int    `json:"iid"`
		URL         string `json:"url"`
		Action      string `json:"action"`
	} `json:"object_attributes"`
	Assignee struct {
		Name      string `json:"name"`
		Username  string `json:"username"`
		AvatarURL string `json:"avatar_url"`
	} `json:"assignee"`
	Assignees []struct {
		Name      string `json:"name"`
		Username  string `json:"username"`
		AvatarURL string `json:"avatar_url"`
	} `json:"assignees"`
	Labels  []Label `json:"labels"`
	Changes struct {
		Labels struct {
			Previous []Label `json:"previous"`
			Current  []Label `json:"current"`
		} `json:"labels"`
		UpdatedByID struct {
			Previous int `json:"previous"`
			Current  int `json:"current"`
		} `json:"updated_by_id"`
	} `json:"changes"`
}

IssueEvent represents a issue event.

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#issues-events

type IssueLink struct {
	SourceIssue *Issue `json:"source_issue"`
	TargetIssue *Issue `json:"target_issue"`
}

IssueLink represents a two-way relation between two issues.

GitLab API docs: https://docs.gitlab.com/ee/api/issue_links.html

type IssueLinks struct {
	Self       string `json:"self"`
	Notes      string `json:"notes"`
	AwardEmoji string `json:"award_emoji"`
	Project    string `json:"project"`
}

IssueLinks represents links of the issue.

type IssueLinksService added in v0.8.0

type IssueLinksService struct {
	// contains filtered or unexported fields
}

IssueLinksService handles communication with the issue relations related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/issue_links.html

func (s *IssueLinksService) CreateIssueLink(pid interface{}, issueIID int, opt *CreateIssueLinkOptions, options ...RequestOptionFunc) (*IssueLink, *Response, error)

CreateIssueLink creates a two-way relation between two issues. User must be allowed to update both issues in order to succeed.

GitLab API docs: https://docs.gitlab.com/ee/api/issue_links.html#create-an-issue-link

func (s *IssueLinksService) DeleteIssueLink(pid interface{}, issueIID, issueLinkID int, options ...RequestOptionFunc) (*IssueLink, *Response, error)

DeleteIssueLink deletes an issue link, thus removes the two-way relationship.

GitLab API docs: https://docs.gitlab.com/ee/api/issue_links.html#delete-an-issue-link

func (*IssueLinksService) ListIssueRelations added in v0.8.0

func (s *IssueLinksService) ListIssueRelations(pid interface{}, issueIID int, options ...RequestOptionFunc) ([]*Issue, *Response, error)

ListIssueRelations gets a list of related issues of a given issue, sorted by the relationship creation datetime (ascending).

Issues will be filtered according to the user authorizations.

GitLab API docs: https://docs.gitlab.com/ee/api/issue_links.html#list-issue-relations

type IssueReferences added in v0.39.1

type IssueReferences struct {
	Short    string `json:"short"`
	Relative string `json:"relative"`
	Full     string `json:"full"`
}

IssueReferences represents references of the issue.

type IssuesService

type IssuesService struct {
	// contains filtered or unexported fields
}

IssuesService handles communication with the issue related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html

func (*IssuesService) AddSpentTime added in v0.6.0

func (s *IssuesService) AddSpentTime(pid interface{}, issue int, opt *AddSpentTimeOptions, options ...RequestOptionFunc) (*TimeStats, *Response, error)

AddSpentTime adds spent time for a single project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#add-spent-time-for-an-issue

func (*IssuesService) CreateIssue

func (s *IssuesService) CreateIssue(pid interface{}, opt *CreateIssueOptions, options ...RequestOptionFunc) (*Issue, *Response, error)

CreateIssue creates a new project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues

func (*IssuesService) DeleteIssue

func (s *IssuesService) DeleteIssue(pid interface{}, issue int, options ...RequestOptionFunc) (*Response, error)

DeleteIssue deletes a single project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#delete-an-issue

func (*IssuesService) GetIssue

func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...RequestOptionFunc) (*Issue, *Response, error)

GetIssue gets a single project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#single-issues

func (*IssuesService) GetParticipants added in v0.39.1

func (s *IssuesService) GetParticipants(pid interface{}, issue int, options ...RequestOptionFunc) ([]*BasicUser, *Response, error)

GetParticipants gets a list of issue participants.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#participants-on-issues

func (*IssuesService) GetTimeSpent added in v0.6.0

func (s *IssuesService) GetTimeSpent(pid interface{}, issue int, options ...RequestOptionFunc) (*TimeStats, *Response, error)

GetTimeSpent gets the spent time for a single project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#get-time-tracking-stats

func (*IssuesService) ListGroupIssues added in v0.6.0

func (s *IssuesService) ListGroupIssues(pid interface{}, opt *ListGroupIssuesOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

ListGroupIssues gets a list of group issues. This function accepts pagination parameters page and per_page to return the list of group issues.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-group-issues

func (*IssuesService) ListIssues

func (s *IssuesService) ListIssues(opt *ListIssuesOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

ListIssues gets all issues created by authenticated user. This function takes pagination parameters page and per_page to restrict the list of issues.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues

func (*IssuesService) ListMergeRequestsClosingIssue added in v0.10.6

func (s *IssuesService) ListMergeRequestsClosingIssue(pid interface{}, issue int, opt *ListMergeRequestsClosingIssueOptions, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

ListMergeRequestsClosingIssue gets all the merge requests that will close issue when merged.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-merge-requests-that-will-close-issue-on-merge

func (*IssuesService) ListMergeRequestsRelatedToIssue added in v0.39.1

func (s *IssuesService) ListMergeRequestsRelatedToIssue(pid interface{}, issue int, opt *ListMergeRequestsRelatedToIssueOptions, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

ListMergeRequestsRelatedToIssue gets all the merge requests that are related to the issue

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-merge-requests-related-to-issue

func (*IssuesService) ListProjectIssues

func (s *IssuesService) ListProjectIssues(pid interface{}, opt *ListProjectIssuesOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

ListProjectIssues gets a list of project issues. This function accepts pagination parameters page and per_page to return the list of project issues.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-project-issues

func (*IssuesService) MoveIssue added in v0.39.1

func (s *IssuesService) MoveIssue(pid interface{}, issue int, opt *MoveIssueOptions, options ...RequestOptionFunc) (*Issue, *Response, error)

MoveIssue updates an existing project issue. This function is also used to mark an issue as closed.

GitLab API docs: https://docs.gitlab.com/ee/api/issues.html#move-an-issue

func (*IssuesService) ResetSpentTime added in v0.6.0

func (s *IssuesService) ResetSpentTime(pid interface{}, issue int, options ...RequestOptionFunc) (*TimeStats, *Response, error)

ResetSpentTime resets the spent time for a single project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#reset-spent-time-for-an-issue

func (*IssuesService) ResetTimeEstimate added in v0.6.0

func (s *IssuesService) ResetTimeEstimate(pid interface{}, issue int, options ...RequestOptionFunc) (*TimeStats, *Response, error)

ResetTimeEstimate resets the time estimate for a single project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#reset-the-time-estimate-for-an-issue

func (*IssuesService) SetTimeEstimate added in v0.6.0

func (s *IssuesService) SetTimeEstimate(pid interface{}, issue int, opt *SetTimeEstimateOptions, options ...RequestOptionFunc) (*TimeStats, *Response, error)

SetTimeEstimate sets the time estimate for a single project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#set-a-time-estimate-for-an-issue

func (*IssuesService) SubscribeToIssue added in v0.11.2

func (s *IssuesService) SubscribeToIssue(pid interface{}, issue int, options ...RequestOptionFunc) (*Issue, *Response, error)

SubscribeToIssue subscribes the authenticated user to the given issue to receive notifications. If the user is already subscribed to the issue, the status code 304 is returned.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#subscribe-to-a-merge-request

func (*IssuesService) UnsubscribeFromIssue added in v0.11.2

func (s *IssuesService) UnsubscribeFromIssue(pid interface{}, issue int, options ...RequestOptionFunc) (*Issue, *Response, error)

UnsubscribeFromIssue unsubscribes the authenticated user from the given issue to not receive notifications from that merge request. If the user is not subscribed to the issue, status code 304 is returned.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#unsubscribe-from-a-merge-request

func (*IssuesService) UpdateIssue

func (s *IssuesService) UpdateIssue(pid interface{}, issue int, opt *UpdateIssueOptions, options ...RequestOptionFunc) (*Issue, *Response, error)

UpdateIssue updates an existing project issue. This function is also used to mark an issue as closed.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#edit-issues

type IssuesStatistics added in v0.39.1

type IssuesStatistics struct {
	Statistics struct {
		Counts struct {
			All    int `json:"all"`
			Closed int `json:"closed"`
			Opened int `json:"opened"`
		} `json:"counts"`
	} `json:"statistics"`
}

IssuesStatistics represents a GitLab issues statistic.

GitLab API docs: https://docs.gitlab.com/ee/api/issues_statistics.html

func (IssuesStatistics) String added in v0.39.1

func (n IssuesStatistics) String() string

type IssuesStatisticsService added in v0.39.1

type IssuesStatisticsService struct {
	// contains filtered or unexported fields
}

IssuesStatisticsService handles communication with the issues statistics related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/issues_statistics.html

func (*IssuesStatisticsService) GetGroupIssuesStatistics added in v0.39.1

func (s *IssuesStatisticsService) GetGroupIssuesStatistics(gid interface{}, opt *GetGroupIssuesStatisticsOptions, options ...RequestOptionFunc) (*IssuesStatistics, *Response, error)

GetGroupIssuesStatistics gets issues count statistics for given group.

GitLab API docs: https://docs.gitlab.com/ee/api/issues_statistics.html#get-group-issues-statistics

func (*IssuesStatisticsService) GetIssuesStatistics added in v0.39.1

GetIssuesStatistics gets issues statistics on all issues the authenticated user has access to.

GitLab API docs: https://docs.gitlab.com/ee/api/issues_statistics.html#get-issues-statistics

func (*IssuesStatisticsService) GetProjectIssuesStatistics added in v0.39.1

func (s *IssuesStatisticsService) GetProjectIssuesStatistics(pid interface{}, opt *GetProjectIssuesStatisticsOptions, options ...RequestOptionFunc) (*IssuesStatistics, *Response, error)

GetProjectIssuesStatistics gets issues count statistics for given project.

GitLab API docs: https://docs.gitlab.com/ee/api/issues_statistics.html#get-project-issues-statistics

type JenkinsCIService added in v0.7.5

type JenkinsCIService struct {
	Service
	Properties *JenkinsCIServiceProperties `json:"properties"`
}

JenkinsCIService represents Jenkins CI service settings.

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#jenkins-ci

type JenkinsCIServiceProperties added in v0.7.5

type JenkinsCIServiceProperties struct {
	URL         string `json:"jenkins_url,omitempty"`
	ProjectName string `json:"project_name,omitempty"`
	Username    string `json:"username,omitempty"`
}

JenkinsCIServiceProperties represents Jenkins CI specific properties.

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#jenkins-ci

type JiraService added in v0.7.0

type JiraService struct {
	Service
	Properties *JiraServiceProperties `json:"properties"`
}

JiraService represents Jira service settings.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#jira

type JiraServiceProperties added in v0.7.0

type JiraServiceProperties struct {
	URL                   string `json:"url,omitempty"`
	APIURL                string `json:"api_url,omitempty"`
	ProjectKey            string `json:"project_key,omitempty" `
	Username              string `json:"username,omitempty" `
	Password              string `json:"password,omitempty" `
	JiraIssueTransitionID string `json:"jira_issue_transition_id,omitempty"`
}

JiraServiceProperties represents Jira specific properties.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#jira

func (*JiraServiceProperties) UnmarshalJSON added in v0.39.1

func (p *JiraServiceProperties) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes the Jira Service Properties.

This allows support of JiraIssueTransitionID for both type string (>11.9) and float64 (<11.9)

type Job added in v0.6.0

type Job struct {
	Commit            *Commit    `json:"commit"`
	Coverage          float64    `json:"coverage"`
	AllowFailure      bool       `json:"allow_failure"`
	CreatedAt         *time.Time `json:"created_at"`
	StartedAt         *time.Time `json:"started_at"`
	FinishedAt        *time.Time `json:"finished_at"`
	Duration          float64    `json:"duration"`
	ArtifactsExpireAt *time.Time `json:"artifacts_expire_at"`
	ID                int        `json:"id"`
	Name              string     `json:"name"`
	Pipeline          struct {
		ID     int    `json:"id"`
		Ref    string `json:"ref"`
		Sha    string `json:"sha"`
		Status string `json:"status"`
	} `json:"pipeline"`
	Ref       string `json:"ref"`
	Artifacts []struct {
		FileType   string `json:"file_type"`
		Filename   string `json:"filename"`
		Size       int    `json:"size"`
		FileFormat string `json:"file_format"`
	} `json:"artifacts"`
	ArtifactsFile struct {
		Filename string `json:"filename"`
		Size     int    `json:"size"`
	} `json:"artifacts_file"`
	Runner struct {
		ID          int    `json:"id"`
		Description string `json:"description"`
		Active      bool   `json:"active"`
		IsShared    bool   `json:"is_shared"`
		Name        string `json:"name"`
	} `json:"runner"`
	Stage  string `json:"stage"`
	Status string `json:"status"`
	Tag    bool   `json:"tag"`
	WebURL string `json:"web_url"`
	User   *User  `json:"user"`
}

Job represents a ci build.

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html

type JobEvent added in v0.39.1

type JobEvent struct {
	ObjectKind        string  `json:"object_kind"`
	Ref               string  `json:"ref"`
	Tag               bool    `json:"tag"`
	BeforeSHA         string  `json:"before_sha"`
	SHA               string  `json:"sha"`
	BuildID           int     `json:"build_id"`
	BuildName         string  `json:"build_name"`
	BuildStage        string  `json:"build_stage"`
	BuildStatus       string  `json:"build_status"`
	BuildStartedAt    string  `json:"build_started_at"`
	BuildFinishedAt   string  `json:"build_finished_at"`
	BuildDuration     float64 `json:"build_duration"`
	BuildAllowFailure bool    `json:"build_allow_failure"`
	PipelineID        int     `json:"pipeline_id"`
	ProjectID         int     `json:"project_id"`
	ProjectName       string  `json:"project_name"`
	User              struct {
		ID    int    `json:"id"`
		Name  string `json:"name"`
		Email string `json:"email"`
	} `json:"user"`
	Commit struct {
		ID          int    `json:"id"`
		SHA         string `json:"sha"`
		Message     string `json:"message"`
		AuthorName  string `json:"author_name"`
		AuthorEmail string `json:"author_email"`
		AuthorURL   string `json:"author_url"`
		Status      string `json:"status"`
		Duration    int    `json:"duration"`
		StartedAt   string `json:"started_at"`
		FinishedAt  string `json:"finished_at"`
	} `json:"commit"`
	Repository *Repository `json:"repository"`
}

JobEvent represents a job event.

GitLab API docs: TODO: link to docs instead of src once they are published. https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/gitlab/data_builder/build.rb

type JobStats added in v0.8.1

type JobStats struct {
	Jobs struct {
		Processed int `json:"processed"`
		Failed    int `json:"failed"`
		Enqueued  int `json:"enqueued"`
	} `json:"jobs"`
}

JobStats represents the GitLab sidekiq job stats.

GitLab API docs: https://docs.gitlab.com/ce/api/sidekiq_metrics.html#get-the-current-job-statistics

type JobsService added in v0.6.0

type JobsService struct {
	// contains filtered or unexported fields
}

JobsService handles communication with the ci builds related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html

func (*JobsService) CancelJob added in v0.6.0

func (s *JobsService) CancelJob(pid interface{}, jobID int, options ...RequestOptionFunc) (*Job, *Response, error)

CancelJob cancels a single job of a project.

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html#cancel-a-job

func (*JobsService) DeleteArtifacts added in v0.39.1

func (s *JobsService) DeleteArtifacts(pid interface{}, jobID int, options ...RequestOptionFunc) (*Job, *Response, error)

DeleteArtifacts delete artifacts of a job

GitLab API docs: https://docs.gitlab.com/ce/api/job_artifacts.html#delete-artifacts

func (*JobsService) DownloadArtifactsFile added in v0.6.0

func (s *JobsService) DownloadArtifactsFile(pid interface{}, refName string, opt *DownloadArtifactsFileOptions, options ...RequestOptionFunc) (io.Reader, *Response, error)

DownloadArtifactsFile download the artifacts file from the given reference name and job provided the job finished successfully.

GitLab API docs: https://docs.gitlab.com/ce/api/job_artifacts.html#download-the-artifacts-archive

func (*JobsService) DownloadSingleArtifactsFile added in v0.11.1

func (s *JobsService) DownloadSingleArtifactsFile(pid interface{}, jobID int, artifactPath string, options ...RequestOptionFunc) (io.Reader, *Response, error)

DownloadSingleArtifactsFile download a file from the artifacts from the given reference name and job provided the job finished successfully. Only a single file is going to be extracted from the archive and streamed to a client.

GitLab API docs: https://docs.gitlab.com/ce/api/job_artifacts.html#download-a-single-artifact-file-by-job-id

func (*JobsService) EraseJob added in v0.6.0

func (s *JobsService) EraseJob(pid interface{}, jobID int, options ...RequestOptionFunc) (*Job, *Response, error)

EraseJob erases a single job of a project, removes a job artifacts and a job trace.

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html#erase-a-job

func (*JobsService) GetJob added in v0.6.0

func (s *JobsService) GetJob(pid interface{}, jobID int, options ...RequestOptionFunc) (*Job, *Response, error)

GetJob gets a single job of a project.

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html#get-a-single-job

func (*JobsService) GetJobArtifacts added in v0.6.0

func (s *JobsService) GetJobArtifacts(pid interface{}, jobID int, options ...RequestOptionFunc) (io.Reader, *Response, error)

GetJobArtifacts get jobs artifacts of a project

GitLab API docs: https://docs.gitlab.com/ce/api/job_artifacts.html#get-job-artifacts

func (*JobsService) GetTraceFile added in v0.6.0

func (s *JobsService) GetTraceFile(pid interface{}, jobID int, options ...RequestOptionFunc) (io.Reader, *Response, error)

GetTraceFile gets a trace of a specific job of a project

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html#get-a-trace-file

func (*JobsService) KeepArtifacts added in v0.6.0

func (s *JobsService) KeepArtifacts(pid interface{}, jobID int, options ...RequestOptionFunc) (*Job, *Response, error)

KeepArtifacts prevents artifacts from being deleted when expiration is set.

GitLab API docs: https://docs.gitlab.com/ce/api/job_artifacts.html#keep-artifacts

func (*JobsService) ListPipelineBridges added in v0.39.1

func (s *JobsService) ListPipelineBridges(pid interface{}, pipelineID int, opts *ListJobsOptions, options ...RequestOptionFunc) ([]*Bridge, *Response, error)

ListPipelineBridges gets a list of bridges for specific pipeline in a project.

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html#list-pipeline-jobs

func (*JobsService) ListPipelineJobs added in v0.6.0

func (s *JobsService) ListPipelineJobs(pid interface{}, pipelineID int, opts *ListJobsOptions, options ...RequestOptionFunc) ([]*Job, *Response, error)

ListPipelineJobs gets a list of jobs for specific pipeline in a project. If the pipeline ID is not found, it will respond with 404.

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html#list-pipeline-jobs

func (*JobsService) ListProjectJobs added in v0.6.0

func (s *JobsService) ListProjectJobs(pid interface{}, opts *ListJobsOptions, options ...RequestOptionFunc) ([]*Job, *Response, error)

ListProjectJobs gets a list of jobs in a project.

The scope of jobs to show, one or array of: created, pending, running, failed, success, canceled, skipped; showing all jobs if none provided

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html#list-project-jobs

func (*JobsService) PlayJob added in v0.6.0

func (s *JobsService) PlayJob(pid interface{}, jobID int, options ...RequestOptionFunc) (*Job, *Response, error)

PlayJob triggers a manual action to start a job.

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html#play-a-job

func (*JobsService) RetryJob added in v0.6.0

func (s *JobsService) RetryJob(pid interface{}, jobID int, options ...RequestOptionFunc) (*Job, *Response, error)

RetryJob retries a single job of a project

GitLab API docs: https://docs.gitlab.com/ce/api/jobs.html#retry-a-job

type Key added in v0.11.0

type Key struct {
	ID        int        `json:"id"`
	Title     string     `json:"title"`
	Key       string     `json:"key"`
	CreatedAt *time.Time `json:"created_at"`
	User      User       `json:"user"`
}

Key represents a GitLab user's SSH key.

GitLab API docs: https://docs.gitlab.com/ee/api/keys.html

type KeySystemEvent added in v0.39.1

type KeySystemEvent struct {
	BaseSystemEvent
	ID       int    `json:"id"`
	Username string `json:"username"`
	Key      string `json:"key"`
}

KeySystemEvent represents a key system event.

GitLab API docs: https://docs.gitlab.com/ee/system_hooks/system_hooks.html

type KeysService added in v0.11.0

type KeysService struct {
	// contains filtered or unexported fields
}

KeysService handles communication with the keys related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/keys.html

func (*KeysService) GetKeyWithUser added in v0.11.0

func (s *KeysService) GetKeyWithUser(key int, options ...RequestOptionFunc) (*Key, *Response, error)

GetKeyWithUser gets a single key by id along with the associated user information.

GitLab API docs: https://docs.gitlab.com/ee/api/keys.html#get-ssh-key-with-user-by-id-of-an-ssh-key

type LDAPGroupLink struct {
	CN          string           `json:"cn"`
	GroupAccess AccessLevelValue `json:"group_access"`
	Provider    string           `json:"provider"`
}

type Label

type Label struct {
	ID                     int    `json:"id"`
	Name                   string `json:"name"`
	Color                  string `json:"color"`
	TextColor              string `json:"text_color"`
	Description            string `json:"description"`
	OpenIssuesCount        int    `json:"open_issues_count"`
	ClosedIssuesCount      int    `json:"closed_issues_count"`
	OpenMergeRequestsCount int    `json:"open_merge_requests_count"`
	Subscribed             bool   `json:"subscribed"`
	Priority               int    `json:"priority"`
	IsProjectLabel         bool   `json:"is_project_label"`
}

Label represents a GitLab label.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html

func (Label) String

func (l Label) String() string

func (*Label) UnmarshalJSON added in v0.11.3

func (l *Label) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type LabelDetails added in v0.39.1

type LabelDetails struct {
	ID              int    `json:"id"`
	Name            string `json:"name"`
	Color           string `json:"color"`
	Description     string `json:"description"`
	DescriptionHTML string `json:"description_html"`
	TextColor       string `json:"text_color"`
}

LabelDetails represents detailed label information.

type LabelEvent added in v0.39.1

type LabelEvent struct {
	ID           int        `json:"id"`
	Action       string     `json:"action"`
	CreatedAt    *time.Time `json:"created_at"`
	ResourceType string     `json:"resource_type"`
	ResourceID   int        `json:"resource_id"`
	User         struct {
		ID        int    `json:"id"`
		Name      string `json:"name"`
		Username  string `json:"username"`
		State     string `json:"state"`
		AvatarURL string `json:"avatar_url"`
		WebURL    string `json:"web_url"`
	} `json:"user"`
	Label struct {
		ID          int    `json:"id"`
		Name        string `json:"name"`
		Color       string `json:"color"`
		TextColor   string `json:"text_color"`
		Description string `json:"description"`
	} `json:"label"`
}

LabelEvent represents a resource label event.

GitLab API docs: https://docs.gitlab.com/ee/api/resource_label_events.html#get-single-issue-label-event

type Labels

type Labels []string

Labels is a custom type with specific marshaling characteristics.

func (*Labels) EncodeValues added in v0.39.1

func (l *Labels) EncodeValues(key string, v *url.Values) error

EncodeValues implements the query.EncodeValues interface

func (*Labels) MarshalJSON

func (l *Labels) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (*Labels) UnmarshalJSON added in v0.39.1

func (l *Labels) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type LabelsService

type LabelsService struct {
	// contains filtered or unexported fields
}

LabelsService handles communication with the label related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html

func (*LabelsService) CreateLabel

func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, options ...RequestOptionFunc) (*Label, *Response, error)

CreateLabel creates a new label for given repository with given name and color.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#create-a-new-label

func (*LabelsService) DeleteLabel

func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions, options ...RequestOptionFunc) (*Response, error)

DeleteLabel deletes a label given by its name.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label

func (*LabelsService) GetLabel added in v0.39.1

func (s *LabelsService) GetLabel(pid interface{}, labelID interface{}, options ...RequestOptionFunc) (*Label, *Response, error)

GetLabel get a single label for a given project.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#get-a-single-project-label

func (*LabelsService) ListLabels

func (s *LabelsService) ListLabels(pid interface{}, opt *ListLabelsOptions, options ...RequestOptionFunc) ([]*Label, *Response, error)

ListLabels gets all labels for given project.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#list-labels

func (*LabelsService) PromoteLabel added in v0.39.1

func (s *LabelsService) PromoteLabel(pid interface{}, labelID interface{}, options ...RequestOptionFunc) (*Response, error)

PromoteLabel Promotes a project label to a group label.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#promote-a-project-label-to-a-group-label

func (*LabelsService) SubscribeToLabel added in v0.7.4

func (s *LabelsService) SubscribeToLabel(pid interface{}, labelID interface{}, options ...RequestOptionFunc) (*Label, *Response, error)

SubscribeToLabel subscribes the authenticated user to a label to receive notifications. If the user is already subscribed to the label, the status code 304 is returned.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#subscribe-to-a-label

func (*LabelsService) UnsubscribeFromLabel added in v0.7.4

func (s *LabelsService) UnsubscribeFromLabel(pid interface{}, labelID interface{}, options ...RequestOptionFunc) (*Response, error)

UnsubscribeFromLabel unsubscribes the authenticated user from a label to not receive notifications from it. If the user is not subscribed to the label, the status code 304 is returned.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#unsubscribe-from-a-label

func (*LabelsService) UpdateLabel

func (s *LabelsService) UpdateLabel(pid interface{}, opt *UpdateLabelOptions, options ...RequestOptionFunc) (*Label, *Response, error)

UpdateLabel updates an existing label with new name or now color. At least one parameter is required, to update the label.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#edit-an-existing-label

type License added in v0.11.4

type License struct {
	ID               int        `json:"id"`
	Plan             string     `json:"plan"`
	CreatedAt        *time.Time `json:"created_at"`
	StartsAt         *ISOTime   `json:"starts_at"`
	ExpiresAt        *ISOTime   `json:"expires_at"`
	HistoricalMax    int        `json:"historical_max"`
	MaximumUserCount int        `json:"maximum_user_count"`
	Expired          bool       `json:"expired"`
	Overage          int        `json:"overage"`
	UserLimit        int        `json:"user_limit"`
	ActiveUsers      int        `json:"active_users"`
	Licensee         struct {
		Name    string `json:"Name"`
		Company string `json:"Company"`
		Email   string `json:"Email"`
	} `json:"licensee"`
	// Add on codes that may occur in legacy licenses that don't have a plan yet.
	// https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/models/license.rb
	AddOns struct {
		GitLabAuditorUser int `json:"GitLab_Auditor_User"`
		GitLabDeployBoard int `json:"GitLab_DeployBoard"`
		GitLabFileLocks   int `json:"GitLab_FileLocks"`
		GitLabGeo         int `json:"GitLab_Geo"`
		GitLabServiceDesk int `json:"GitLab_ServiceDesk"`
	} `json:"add_ons"`
}

License represents a GitLab license.

GitLab API docs: https://docs.gitlab.com/ee/api/license.html

func (License) String added in v0.11.4

func (l License) String() string

type LicenseService added in v0.11.4

type LicenseService struct {
	// contains filtered or unexported fields
}

LicenseService handles communication with the license related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/license.html

func (*LicenseService) AddLicense added in v0.11.4

func (s *LicenseService) AddLicense(opt *AddLicenseOptions, options ...RequestOptionFunc) (*License, *Response, error)

AddLicense adds a new license.

GitLab API docs: https://docs.gitlab.com/ee/api/license.html#add-a-new-license

func (*LicenseService) GetLicense added in v0.11.4

func (s *LicenseService) GetLicense() (*License, *Response, error)

GetLicense retrieves information about the current license.

GitLab API docs: https://docs.gitlab.com/ee/api/license.html#retrieve-information-about-the-current-license

type LicenseTemplate added in v0.11.1

type LicenseTemplate struct {
	Key         string   `json:"key"`
	Name        string   `json:"name"`
	Nickname    string   `json:"nickname"`
	Featured    bool     `json:"featured"`
	HTMLURL     string   `json:"html_url"`
	SourceURL   string   `json:"source_url"`
	Description string   `json:"description"`
	Conditions  []string `json:"conditions"`
	Permissions []string `json:"permissions"`
	Limitations []string `json:"limitations"`
	Content     string   `json:"content"`
}

LicenseTemplate represents a license template.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/licenses.html

type LicenseTemplatesService added in v0.11.1

type LicenseTemplatesService struct {
	// contains filtered or unexported fields
}

LicenseTemplatesService handles communication with the license templates related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/licenses.html

func (*LicenseTemplatesService) GetLicenseTemplate added in v0.11.1

func (s *LicenseTemplatesService) GetLicenseTemplate(template string, opt *GetLicenseTemplateOptions, options ...RequestOptionFunc) (*LicenseTemplate, *Response, error)

GetLicenseTemplate get a single license template. You can pass parameters to replace the license placeholder.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/licenses.html#single-license-template

func (*LicenseTemplatesService) ListLicenseTemplates added in v0.11.1

func (s *LicenseTemplatesService) ListLicenseTemplates(opt *ListLicenseTemplatesOptions, options ...RequestOptionFunc) ([]*LicenseTemplate, *Response, error)

ListLicenseTemplates get all license templates.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/licenses.html#list-license-templates

type Links struct {
	Self          string `json:"self"`
	Issues        string `json:"issues"`
	MergeRequests string `json:"merge_requests"`
	RepoBranches  string `json:"repo_branches"`
	Labels        string `json:"labels"`
	Events        string `json:"events"`
	Members       string `json:"members"`
}

Links represents a project web links for self, issues, merge_requests, repo_branches, labels, events, members.

type LintResult added in v0.7.5

type LintResult struct {
	Status string   `json:"status"`
	Errors []string `json:"errors"`
}

LintResult represents the linting results.

GitLab API docs: https://docs.gitlab.com/ce/api/lint.html

type ListAccessRequestsOptions added in v0.11.1

type ListAccessRequestsOptions ListOptions

ListAccessRequestsOptions represents the available ListProjectAccessRequests() or ListGroupAccessRequests() options.

GitLab API docs: https://docs.gitlab.com/ce/api/access_requests.html#list-access-requests-for-a-group-or-project

type ListApplicationsOptions added in v0.39.1

type ListApplicationsOptions ListOptions

type ListAwardEmojiOptions added in v0.10.6

type ListAwardEmojiOptions ListOptions

ListAwardEmojiOptions represents the available options for listing emoji for each resources

GitLab API docs: https://docs.gitlab.com/ce/api/award_emoji.html

type ListBranchesOptions added in v0.6.0

type ListBranchesOptions struct {
	ListOptions
	Search *string `url:"search,omitempty" json:"search,omitempty"`
}

ListBranchesOptions represents the available ListBranches() options.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html#list-repository-branches

type ListBroadcastMessagesOptions added in v0.8.1

type ListBroadcastMessagesOptions ListOptions

ListBroadcastMessagesOptions represents the available ListBroadcastMessages() options.

GitLab API docs: https://docs.gitlab.com/ce/api/broadcast_messages.html#get-all-broadcast-messages

type ListCIYMLTemplatesOptions added in v0.11.1

type ListCIYMLTemplatesOptions ListOptions

ListCIYMLTemplatesOptions represents the available ListAllTemplates() options.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/gitignores.html#list-gitignore-templates

type ListCommitDiscussionsOptions added in v0.11.2

type ListCommitDiscussionsOptions ListOptions

ListCommitDiscussionsOptions represents the available ListCommitDiscussions() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#list-project-commit-discussion-items

type ListCommitsOptions

type ListCommitsOptions struct {
	ListOptions
	RefName     *string    `url:"ref_name,omitempty" json:"ref_name,omitempty"`
	Since       *time.Time `url:"since,omitempty" json:"since,omitempty"`
	Until       *time.Time `url:"until,omitempty" json:"until,omitempty"`
	Path        *string    `url:"path,omitempty" json:"path,omitempty"`
	All         *bool      `url:"all,omitempty" json:"all,omitempty"`
	WithStats   *bool      `url:"with_stats,omitempty" json:"with_stats,omitempty"`
	FirstParent *bool      `url:"first_parent,omitempty" json:"first_parent,omitempty"`
}

ListCommitsOptions represents the available ListCommits() options.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#list-repository-commits

type ListContributionEventsOptions added in v0.8.0

type ListContributionEventsOptions struct {
	ListOptions
	Action     *EventTypeValue       `url:"action,omitempty" json:"action,omitempty"`
	TargetType *EventTargetTypeValue `url:"target_type,omitempty" json:"target_type,omitempty"`
	Before     *ISOTime              `url:"before,omitempty" json:"before,omitempty"`
	After      *ISOTime              `url:"after,omitempty" json:"after,omitempty"`
	Sort       *string               `url:"sort,omitempty" json:"sort,omitempty"`
}

ListContributionEventsOptions represents the options for GetUserContributionEvents

GitLap API docs: https://docs.gitlab.com/ce/api/events.html#get-user-contribution-events

type ListContributorsOptions added in v0.8.1

type ListContributorsOptions struct {
	ListOptions
	OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort    *string `url:"sort,omitempty" json:"sort,omitempty"`
}

ListContributorsOptions represents the available ListContributors() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributors

type ListDescendantGroupsOptions added in v0.39.1

type ListDescendantGroupsOptions ListGroupsOptions

ListDescendantGroupsOptions represents the available ListDescendantGroups() options.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-a-groups-descendant-groups

type ListEmailsForUserOptions added in v0.8.1

type ListEmailsForUserOptions ListOptions

ListEmailsForUserOptions represents the available ListEmailsForUser() options.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-emails-for-user

type ListEnvironmentsOptions added in v0.7.0

type ListEnvironmentsOptions ListOptions

ListEnvironmentsOptions represents the available ListEnvironments() options.

GitLab API docs: https://docs.gitlab.com/ee/api/environments.html#list-environments

type ListEpicNotesOptions added in v0.39.1

type ListEpicNotesOptions struct {
	ListOptions
	OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort    *string `url:"sort,omitempty" json:"sort,omitempty"`
}

ListEpicNotesOptions represents the available ListEpicNotes() options.

GitLab API docs: https://docs.gitlab.com/ee/api/notes.html#list-all-epic-notes

type ListFreezePeriodsOptions added in v0.39.1

type ListFreezePeriodsOptions ListOptions

ListFreezePeriodsOptions represents the available ListFreezePeriodsOptions() options.

GitLab API docs: https://docs.gitlab.com/ce/api/freeze_periods.html#list-freeze-periods

type ListGroupBadgesOptions added in v0.39.1

type ListGroupBadgesOptions ListOptions

ListGroupBadgesOptions represents the available ListGroupBadges() options.

GitLab API docs: https://docs.gitlab.com/ee/api/group_badges.html#list-all-badges-of-a-group

type ListGroupDeployTokensOptions added in v0.39.1

type ListGroupDeployTokensOptions ListOptions

ListGroupDeployTokensOptions represents the available ListGroupDeployTokens() options.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#list-group-deploy-deploy-tokens

type ListGroupEpicDiscussionsOptions added in v0.11.2

type ListGroupEpicDiscussionsOptions ListOptions

ListGroupEpicDiscussionsOptions represents the available ListEpicDiscussions() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#list-group-epic-discussion-items

type ListGroupEpicsOptions added in v0.39.1

type ListGroupEpicsOptions struct {
	ListOptions
	AuthorID                *int       `url:"author_id,omitempty" json:"author_id,omitempty"`
	Labels                  Labels     `url:"labels,comma,omitempty" json:"labels,omitempty"`
	WithLabelDetails        *bool      `url:"with_labels_details,omitempty" json:"with_labels_details,omitempty"`
	OrderBy                 *string    `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort                    *string    `url:"sort,omitempty" json:"sort,omitempty"`
	Search                  *string    `url:"search,omitempty" json:"search,omitempty"`
	State                   *string    `url:"state,omitempty" json:"state,omitempty"`
	CreatedAfter            *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	CreatedBefore           *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	UpdatedAfter            *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore           *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"`
	IncludeAncestorGroups   *bool      `url:"include_ancestor_groups,omitempty" json:"include_ancestor_groups,omitempty"`
	IncludeDescendantGroups *bool      `url:"include_descendant_groups,omitempty" json:"include_descendant_groups,omitempty"`
	MyReactionEmoji         *string    `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"`
}

ListGroupEpicsOptions represents the available ListGroupEpics() options.

GitLab API docs: https://docs.gitlab.com/ee/api/epics.html#list-epics-for-a-group

type ListGroupIssueBoardListsOptions added in v0.11.0

type ListGroupIssueBoardListsOptions ListOptions

ListGroupIssueBoardListsOptions represents the available ListGroupIssueBoardLists() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#list-board-lists

type ListGroupIssueBoardsOptions added in v0.11.0

type ListGroupIssueBoardsOptions ListOptions

ListGroupIssueBoardsOptions represents the available ListGroupIssueBoards() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#group-board

type ListGroupIssuesOptions added in v0.6.0

type ListGroupIssuesOptions struct {
	ListOptions
	State              *string    `url:"state,omitempty" json:"state,omitempty"`
	Labels             Labels     `url:"labels,comma,omitempty" json:"labels,omitempty"`
	NotLabels          Labels     `url:"not[labels],comma,omitempty" json:"not[labels],omitempty"`
	WithLabelDetails   *bool      `url:"with_labels_details,omitempty" json:"with_labels_details,omitempty"`
	IIDs               []int      `url:"iids[],omitempty" json:"iids,omitempty"`
	Milestone          *string    `url:"milestone,omitempty" json:"milestone,omitempty"`
	NotMilestone       *string    `url:"not[milestone],omitempty" json:"not[milestone],omitempty"`
	Scope              *string    `url:"scope,omitempty" json:"scope,omitempty"`
	AuthorID           *int       `url:"author_id,omitempty" json:"author_id,omitempty"`
	NotAuthorID        []int      `url:"not[author_id],omitempty" json:"not[author_id],omitempty"`
	AuthorUsername     *string    `url:"author_username,omitempty" json:"author_username,omitempty"`
	AssigneeID         *int       `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	NotAssigneeID      []int      `url:"not[assignee_id],omitempty" json:"not[assignee_id],omitempty"`
	AssigneeUsername   *string    `url:"assignee_username,omitempty" json:"assignee_username,omitempty"`
	MyReactionEmoji    *string    `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"`
	NotMyReactionEmoji []string   `url:"not[my_reaction_emoji],omitempty" json:"not[my_reaction_emoji],omitempty"`
	OrderBy            *string    `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort               *string    `url:"sort,omitempty" json:"sort,omitempty"`
	Search             *string    `url:"search,omitempty" json:"search,omitempty"`
	In                 *string    `url:"in,omitempty" json:"in,omitempty"`
	CreatedAfter       *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	CreatedBefore      *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	UpdatedAfter       *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore      *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"`
}

ListGroupIssuesOptions represents the available ListGroupIssues() options.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-group-issues

type ListGroupLabelsOptions added in v0.39.1

type ListGroupLabelsOptions ListOptions

ListGroupLabelsOptions represents the available ListGroupLabels() options.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#list-labels

type ListGroupMembersOptions added in v0.4.0

type ListGroupMembersOptions struct {
	ListOptions
	Query *string `url:"query,omitempty" json:"query,omitempty"`
}

ListGroupMembersOptions represents the available ListGroupMembers() and ListAllGroupMembers() options.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project

type ListGroupMergeRequestsOptions added in v0.11.1

type ListGroupMergeRequestsOptions struct {
	ListOptions
	State                  *string    `url:"state,omitempty" json:"state,omitempty"`
	OrderBy                *string    `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort                   *string    `url:"sort,omitempty" json:"sort,omitempty"`
	Milestone              *string    `url:"milestone,omitempty" json:"milestone,omitempty"`
	View                   *string    `url:"view,omitempty" json:"view,omitempty"`
	Labels                 Labels     `url:"labels,omitempty" json:"labels,omitempty"`
	NotLabels              Labels     `url:"not[labels],comma,omitempty" json:"not[labels],omitempty"`
	WithLabelsDetails      *bool      `url:"with_labels_details,omitempty" json:"with_labels_details,omitempty"`
	WithMergeStatusRecheck *bool      `url:"with_merge_status_recheck,omitempty" json:"with_merge_status_recheck,omitempty"`
	CreatedAfter           *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	CreatedBefore          *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	UpdatedAfter           *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore          *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"`
	Scope                  *string    `url:"scope,omitempty" json:"scope,omitempty"`
	AuthorID               *int       `url:"author_id,omitempty" json:"author_id,omitempty"`
	AssigneeID             *int       `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	MyReactionEmoji        *string    `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"`
	SourceBranch           *string    `url:"source_branch,omitempty" json:"source_branch,omitempty"`
	TargetBranch           *string    `url:"target_branch,omitempty" json:"target_branch,omitempty"`
	Search                 *string    `url:"search,omitempty" json:"search,omitempty"`
}

ListGroupMergeRequestsOptions represents the available ListGroupMergeRequests() options.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#list-group-merge-requests

type ListGroupMilestonesOptions added in v0.10.0

type ListGroupMilestonesOptions struct {
	ListOptions
	IIDs                    []int   `url:"iids,omitempty" json:"iids,omitempty"`
	State                   *string `url:"state,omitempty" json:"state,omitempty"`
	Title                   *string `url:"title,omitempty" json:"title,omitempty"`
	Search                  *string `url:"search,omitempty" json:"search,omitempty"`
	IncludeParentMilestones *bool   `url:"include_parent_milestones,omitempty" json:"include_parent_milestones,omitempty"`
}

ListGroupMilestonesOptions represents the available ListGroupMilestones() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#list-group-milestones

type ListGroupProjectsOptions added in v0.4.0

type ListGroupProjectsOptions struct {
	ListOptions
	Archived                 *bool            `url:"archived,omitempty" json:"archived,omitempty"`
	Visibility               *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"`
	OrderBy                  *string          `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort                     *string          `url:"sort,omitempty" json:"sort,omitempty"`
	Search                   *string          `url:"search,omitempty" json:"search,omitempty"`
	Simple                   *bool            `url:"simple,omitempty" json:"simple,omitempty"`
	Owned                    *bool            `url:"owned,omitempty" json:"owned,omitempty"`
	Starred                  *bool            `url:"starred,omitempty" json:"starred,omitempty"`
	WithIssuesEnabled        *bool            `url:"with_issues_enabled,omitempty" json:"with_issues_enabled,omitempty"`
	WithMergeRequestsEnabled *bool            `url:"with_merge_requests_enabled,omitempty" json:"with_merge_requests_enabled,omitempty"`
	WithShared               *bool            `url:"with_shared,omitempty" json:"with_shared,omitempty"`
	IncludeSubgroups         *bool            `url:"include_subgroups,omitempty" json:"include_subgroups,omitempty"`
	WithCustomAttributes     *bool            `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
}

ListGroupProjectsOptions represents the available ListGroup() options.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-a-group-39-s-projects

type ListGroupVariablesOptions added in v0.39.1

type ListGroupVariablesOptions ListOptions

ListGroupVariablesOptions represents the available options for listing variables for a group.

GitLab API docs: https://docs.gitlab.com/ee/api/group_level_variables.html#list-group-variables

type ListGroupsOptions

type ListGroupsOptions struct {
	ListOptions
	AllAvailable         *bool             `url:"all_available,omitempty" json:"all_available,omitempty"`
	MinAccessLevel       *AccessLevelValue `url:"min_access_level,omitempty" json:"min_access_level,omitempty"`
	OrderBy              *string           `url:"order_by,omitempty" json:"order_by,omitempty"`
	Owned                *bool             `url:"owned,omitempty" json:"owned,omitempty"`
	Search               *string           `url:"search,omitempty" json:"search,omitempty"`
	SkipGroups           []int             `url:"skip_groups,omitempty" json:"skip_groups,omitempty"`
	Sort                 *string           `url:"sort,omitempty" json:"sort,omitempty"`
	Statistics           *bool             `url:"statistics,omitempty" json:"statistics,omitempty"`
	TopLevelOnly         *bool             `url:"top_level_only,omitempty" json:"top_level_only,omitempty"`
	WithCustomAttributes *bool             `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
}

ListGroupsOptions represents the available ListGroups() options.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-project-groups

type ListGroupsRunnersOptions added in v0.39.1

type ListGroupsRunnersOptions struct {
	ListOptions
	Type    *string  `url:"type,omitempty" json:"type,omitempty"`
	Status  *string  `url:"status,omitempty" json:"status,omitempty"`
	TagList []string `url:"tag_list,comma,omitempty" json:"tag_list,omitempty"`
}

ListGroupsRunnersOptions represents the available ListGroupsRunners() options.

GitLab API docs: https://docs.gitlab.com/ee/api/runners.html#list-groups-runners

type ListInstanceVariablesOptions added in v0.39.1

type ListInstanceVariablesOptions ListOptions

ListInstanceVariablesOptions represents the available options for listing variables for an instance.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_level_ci_variables.html#list-all-instance-variables

type ListIssueBoardsOptions added in v0.8.1

type ListIssueBoardsOptions ListOptions

ListIssueBoardsOptions represents the available ListIssueBoards() options.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#project-board

type ListIssueDiscussionsOptions added in v0.11.2

type ListIssueDiscussionsOptions ListOptions

ListIssueDiscussionsOptions represents the available ListIssueDiscussions() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#list-project-issue-discussion-items

type ListIssueNotesOptions

type ListIssueNotesOptions struct {
	ListOptions
	OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort    *string `url:"sort,omitempty" json:"sort,omitempty"`
}

ListIssueNotesOptions represents the available ListIssueNotes() options.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#list-project-issue-notes

type ListIssuesOptions

type ListIssuesOptions struct {
	ListOptions
	State              *string    `url:"state,omitempty" json:"state,omitempty"`
	Labels             Labels     `url:"labels,comma,omitempty" json:"labels,omitempty"`
	NotLabels          Labels     `url:"not[labels],comma,omitempty" json:"not[labels],omitempty"`
	WithLabelDetails   *bool      `url:"with_labels_details,omitempty" json:"with_labels_details,omitempty"`
	Milestone          *string    `url:"milestone,omitempty" json:"milestone,omitempty"`
	NotMilestone       *string    `url:"not[milestone],omitempty" json:"not[milestone],omitempty"`
	Scope              *string    `url:"scope,omitempty" json:"scope,omitempty"`
	AuthorID           *int       `url:"author_id,omitempty" json:"author_id,omitempty"`
	NotAuthorID        []int      `url:"not[author_id],omitempty" json:"not[author_id],omitempty"`
	AssigneeID         *int       `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	NotAssigneeID      []int      `url:"not[assignee_id],omitempty" json:"not[assignee_id],omitempty"`
	AssigneeUsername   *string    `url:"assignee_username,omitempty" json:"assignee_username,omitempty"`
	MyReactionEmoji    *string    `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"`
	NotMyReactionEmoji []string   `url:"not[my_reaction_emoji],omitempty" json:"not[my_reaction_emoji],omitempty"`
	IIDs               []int      `url:"iids[],omitempty" json:"iids,omitempty"`
	In                 *string    `url:"in,omitempty" json:"in,omitempty"`
	OrderBy            *string    `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort               *string    `url:"sort,omitempty" json:"sort,omitempty"`
	Search             *string    `url:"search,omitempty" json:"search,omitempty"`
	CreatedAfter       *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	CreatedBefore      *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	UpdatedAfter       *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore      *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"`
	Confidential       *bool      `url:"confidential,omitempty" json:"confidential,omitempty"`
}

ListIssuesOptions represents the available ListIssues() options.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues

type ListJobsOptions added in v0.6.0

type ListJobsOptions struct {
	ListOptions
	Scope []BuildStateValue `url:"scope[],omitempty" json:"scope,omitempty"`
}

ListJobsOptions are options for two list apis

type ListLabelEventsOptions added in v0.39.1

type ListLabelEventsOptions struct {
	ListOptions
}

ListLabelEventsOptions represents the options for all resource label events list methods.

GitLab API docs: https://docs.gitlab.com/ee/api/resource_label_events.html#list-project-issue-label-events

type ListLabelsOptions added in v0.8.1

type ListLabelsOptions struct {
	ListOptions
	WithCounts            *bool `url:"with_counts,omitempty" json:"with_counts,omitempty"`
	IncludeAncestorGroups *bool `url:"include_ancestor_groups,omitempty" json:"include_ancestor_groups,omitempty"`
}

ListLabelsOptions represents the available ListLabels() options.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#list-labels

type ListLicenseTemplatesOptions added in v0.11.1

type ListLicenseTemplatesOptions struct {
	ListOptions
	Popular *bool `url:"popular,omitempty" json:"popular,omitempty"`
}

ListLicenseTemplatesOptions represents the available ListLicenseTemplates() options.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/licenses.html#list-license-templates

type ListMergeRequestDiscussionsOptions added in v0.11.2

type ListMergeRequestDiscussionsOptions ListOptions

ListMergeRequestDiscussionsOptions represents the available ListMergeRequestDiscussions() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#list-project-merge-request-discussion-items

type ListMergeRequestNotesOptions added in v0.8.1

type ListMergeRequestNotesOptions struct {
	ListOptions
	OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort    *string `url:"sort,omitempty" json:"sort,omitempty"`
}

ListMergeRequestNotesOptions represents the available ListMergeRequestNotes() options.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#list-all-merge-request-notes

type ListMergeRequestsClosingIssueOptions added in v0.10.6

type ListMergeRequestsClosingIssueOptions ListOptions

ListMergeRequestsClosingIssueOptions represents the available ListMergeRequestsClosingIssue() options.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-merge-requests-that-will-close-issue-on-merge

type ListMergeRequestsOptions

type ListMergeRequestsOptions struct {
	ListOptions
	State                  *string    `url:"state,omitempty" json:"state,omitempty"`
	OrderBy                *string    `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort                   *string    `url:"sort,omitempty" json:"sort,omitempty"`
	Milestone              *string    `url:"milestone,omitempty" json:"milestone,omitempty"`
	View                   *string    `url:"view,omitempty" json:"view,omitempty"`
	Labels                 Labels     `url:"labels,comma,omitempty" json:"labels,omitempty"`
	NotLabels              Labels     `url:"not[labels],comma,omitempty" json:"not[labels],omitempty"`
	WithLabelsDetails      *bool      `url:"with_labels_details,omitempty" json:"with_labels_details,omitempty"`
	WithMergeStatusRecheck *bool      `url:"with_merge_status_recheck,omitempty" json:"with_merge_status_recheck,omitempty"`
	CreatedAfter           *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	CreatedBefore          *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	UpdatedAfter           *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore          *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"`
	Scope                  *string    `url:"scope,omitempty" json:"scope,omitempty"`
	AuthorID               *int       `url:"author_id,omitempty" json:"author_id,omitempty"`
	AssigneeID             *int       `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	MyReactionEmoji        *string    `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"`
	SourceBranch           *string    `url:"source_branch,omitempty" json:"source_branch,omitempty"`
	TargetBranch           *string    `url:"target_branch,omitempty" json:"target_branch,omitempty"`
	Search                 *string    `url:"search,omitempty" json:"search,omitempty"`
	In                     *string    `url:"in,omitempty" json:"in,omitempty"`
	WIP                    *string    `url:"wip,omitempty" json:"wip,omitempty"`
}

ListMergeRequestsOptions represents the available ListMergeRequests() options.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests

type ListMergeRequestsRelatedToIssueOptions added in v0.39.1

type ListMergeRequestsRelatedToIssueOptions ListOptions

ListMergeRequestsRelatedToIssueOptions represents the available ListMergeRequestsRelatedToIssue() options.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-merge-requests-related-to-issue

type ListMilestonesOptions

type ListMilestonesOptions struct {
	ListOptions
	IIDs   []int   `url:"iids,omitempty" json:"iids,omitempty"`
	Title  *string `url:"title,omitempty" json:"title,omitempty"`
	State  *string `url:"state,omitempty" json:"state,omitempty"`
	Search *string `url:"search,omitempty" json:"search,omitempty"`
}

ListMilestonesOptions represents the available ListMilestones() options.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#list-project-milestones

type ListNamespacesOptions

type ListNamespacesOptions struct {
	ListOptions
	Search *string `url:"search,omitempty" json:"search,omitempty"`
}

ListNamespacesOptions represents the available ListNamespaces() options.

GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces

type ListOptions

type ListOptions struct {
	// For paginated result sets, page of results to retrieve.
	Page int `url:"page,omitempty" json:"page,omitempty"`

	// For paginated result sets, the number of results to include per page.
	PerPage int `url:"per_page,omitempty" json:"per_page,omitempty"`
}

ListOptions specifies the optional parameters to various List methods that support pagination.

type ListPagesDomainsOptions added in v0.8.0

type ListPagesDomainsOptions ListOptions

ListPagesDomainsOptions represents the available ListPagesDomains() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html#list-pages-domains

type ListPipelineSchedulesOptions added in v0.9.0

type ListPipelineSchedulesOptions ListOptions

ListPipelineSchedulesOptions represents the available ListPipelineTriggers() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#list-project-triggers

type ListPipelineTriggersOptions added in v0.6.0

type ListPipelineTriggersOptions ListOptions

ListPipelineTriggersOptions represents the available ListPipelineTriggers() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#list-project-triggers

type ListProjectBadgesOptions added in v0.11.1

type ListProjectBadgesOptions ListOptions

ListProjectBadgesOptions represents the available ListProjectBadges() options.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#list-all-badges-of-a-project

type ListProjectDeployKeysOptions added in v0.8.1

type ListProjectDeployKeysOptions ListOptions

ListProjectDeployKeysOptions represents the available ListProjectDeployKeys() options.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html#list-project-deploy-keys

type ListProjectDeployTokensOptions added in v0.39.1

type ListProjectDeployTokensOptions ListOptions

ListProjectDeployTokensOptions represents the available ListProjectDeployTokens() options.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_tokens.html#list-project-deploy-tokens

type ListProjectDeploymentsOptions added in v0.8.1

type ListProjectDeploymentsOptions struct {
	ListOptions
	OrderBy       *string    `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort          *string    `url:"sort,omitempty" json:"sort,omitempty"`
	UpdatedAfter  *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore *time.Time `url:"update_before,omitempty" json:"updated_before,omitempty"`
	Environment   *string    `url:"environment,omitempty" json:"environment,omitempty"`
	Status        *string    `url:"status,omitempty" json:"status,omitempty"`
}

ListProjectDeploymentsOptions represents the available ListProjectDeployments() options.

GitLab API docs: https://docs.gitlab.com/ce/api/deployments.html#list-project-deployments

type ListProjectHooksOptions

type ListProjectHooksOptions ListOptions

ListProjectHooksOptions represents the available ListProjectHooks() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-project-hooks

type ListProjectIssuesOptions

type ListProjectIssuesOptions struct {
	ListOptions
	IIDs               []int      `url:"iids[],omitempty" json:"iids,omitempty"`
	State              *string    `url:"state,omitempty" json:"state,omitempty"`
	Labels             Labels     `url:"labels,comma,omitempty" json:"labels,omitempty"`
	NotLabels          Labels     `url:"not[labels],comma,omitempty" json:"not[labels],omitempty"`
	WithLabelDetails   *bool      `url:"with_labels_details,omitempty" json:"with_labels_details,omitempty"`
	Milestone          *string    `url:"milestone,omitempty" json:"milestone,omitempty"`
	NotMilestone       []string   `url:"not[milestone],omitempty" json:"not[milestone],omitempty"`
	Scope              *string    `url:"scope,omitempty" json:"scope,omitempty"`
	AuthorID           *int       `url:"author_id,omitempty" json:"author_id,omitempty"`
	NotAuthorID        []int      `url:"not[author_id],omitempty" json:"not[author_id],omitempty"`
	AssigneeID         *int       `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	NotAssigneeID      []int      `url:"not[assignee_id],omitempty" json:"not[assignee_id],omitempty"`
	AssigneeUsername   *string    `url:"assignee_username,omitempty" json:"assignee_username,omitempty"`
	MyReactionEmoji    *string    `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"`
	NotMyReactionEmoji []string   `url:"not[my_reaction_emoji],omitempty" json:"not[my_reaction_emoji],omitempty"`
	OrderBy            *string    `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort               *string    `url:"sort,omitempty" json:"sort,omitempty"`
	Search             *string    `url:"search,omitempty" json:"search,omitempty"`
	In                 *string    `url:"in,omitempty" json:"in,omitempty"`
	CreatedAfter       *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	CreatedBefore      *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	UpdatedAfter       *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore      *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"`
	Confidential       *bool      `url:"confidential,omitempty" json:"confidential,omitempty"`
}

ListProjectIssuesOptions represents the available ListProjectIssues() options.

GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-project-issues

type ListProjectMembersOptions

type ListProjectMembersOptions struct {
	ListOptions
	Query *string `url:"query,omitempty" json:"query,omitempty"`
}

ListProjectMembersOptions represents the available ListProjectMembers() and ListAllProjectMembers() options.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project

type ListProjectMergeRequestsOptions added in v0.6.2

type ListProjectMergeRequestsOptions struct {
	ListOptions
	IIDs                   []int      `url:"iids[],omitempty" json:"iids,omitempty"`
	State                  *string    `url:"state,omitempty" json:"state,omitempty"`
	OrderBy                *string    `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort                   *string    `url:"sort,omitempty" json:"sort,omitempty"`
	Milestone              *string    `url:"milestone,omitempty" json:"milestone,omitempty"`
	View                   *string    `url:"view,omitempty" json:"view,omitempty"`
	Labels                 Labels     `url:"labels,comma,omitempty" json:"labels,omitempty"`
	NotLabels              Labels     `url:"not[labels],comma,omitempty" json:"not[labels],omitempty"`
	WithLabelsDetails      *bool      `url:"with_labels_details,omitempty" json:"with_labels_details,omitempty"`
	WithMergeStatusRecheck *bool      `url:"with_merge_status_recheck,omitempty" json:"with_merge_status_recheck,omitempty"`
	CreatedAfter           *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	CreatedBefore          *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	UpdatedAfter           *time.Time `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore          *time.Time `url:"updated_before,omitempty" json:"updated_before,omitempty"`
	Scope                  *string    `url:"scope,omitempty" json:"scope,omitempty"`
	AuthorID               *int       `url:"author_id,omitempty" json:"author_id,omitempty"`
	AssigneeID             *int       `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	MyReactionEmoji        *string    `url:"my_reaction_emoji,omitempty" json:"my_reaction_emoji,omitempty"`
	SourceBranch           *string    `url:"source_branch,omitempty" json:"source_branch,omitempty"`
	TargetBranch           *string    `url:"target_branch,omitempty" json:"target_branch,omitempty"`
	Search                 *string    `url:"search,omitempty" json:"search,omitempty"`
	WIP                    *string    `url:"wip,omitempty" json:"wip,omitempty"`
}

ListProjectMergeRequestsOptions represents the available ListMergeRequests() options.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#list-project-merge-requests

type ListProjectPipelinesOptions added in v0.8.0

type ListProjectPipelinesOptions struct {
	ListOptions
	Scope         *string          `url:"scope,omitempty" json:"scope,omitempty"`
	Status        *BuildStateValue `url:"status,omitempty" json:"status,omitempty"`
	Ref           *string          `url:"ref,omitempty" json:"ref,omitempty"`
	SHA           *string          `url:"sha,omitempty" json:"sha,omitempty"`
	YamlErrors    *bool            `url:"yaml_errors,omitempty" json:"yaml_errors,omitempty"`
	Name          *string          `url:"name,omitempty" json:"name,omitempty"`
	Username      *string          `url:"username,omitempty" json:"username,omitempty"`
	UpdatedAfter  *time.Time       `url:"updated_after,omitempty" json:"updated_after,omitempty"`
	UpdatedBefore *time.Time       `url:"updated_before,omitempty" json:"updated_before,omitempty"`
	OrderBy       *string          `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort          *string          `url:"sort,omitempty" json:"sort,omitempty"`
}

ListProjectPipelinesOptions represents the available ListProjectPipelines() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#list-project-pipelines

type ListProjectRunnersOptions added in v0.7.5

type ListProjectRunnersOptions ListRunnersOptions

ListProjectRunnersOptions represents the available ListProjectRunners() options.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#list-project-s-runners

type ListProjectSnippetsOptions added in v0.7.2

type ListProjectSnippetsOptions ListOptions

ListProjectSnippetsOptions represents the available ListSnippets() options.

GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#list-snippets

type ListProjectUserOptions added in v0.8.0

type ListProjectUserOptions struct {
	ListOptions
	Search *string `url:"search,omitempty" json:"search,omitempty"`
}

ListProjectUserOptions represents the available ListProjectsUsers() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#get-project-users

type ListProjectVariablesOptions added in v0.39.1

type ListProjectVariablesOptions ListOptions

ListProjectVariablesOptions represents the available options for listing variables in a project.

GitLab API docs: https://docs.gitlab.com/ee/api/project_level_variables.html#list-project-variables

type ListProjectsOptions

type ListProjectsOptions struct {
	ListOptions
	Archived                 *bool             `url:"archived,omitempty" json:"archived,omitempty"`
	Visibility               *VisibilityValue  `url:"visibility,omitempty" json:"visibility,omitempty"`
	OrderBy                  *string           `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort                     *string           `url:"sort,omitempty" json:"sort,omitempty"`
	Search                   *string           `url:"search,omitempty" json:"search,omitempty"`
	SearchNamespaces         *bool             `url:"search_namespaces,omitempty" json:"search_namespaces,omitempty"`
	Simple                   *bool             `url:"simple,omitempty" json:"simple,omitempty"`
	Owned                    *bool             `url:"owned,omitempty" json:"owned,omitempty"`
	Membership               *bool             `url:"membership,omitempty" json:"membership,omitempty"`
	Starred                  *bool             `url:"starred,omitempty" json:"starred,omitempty"`
	Statistics               *bool             `url:"statistics,omitempty" json:"statistics,omitempty"`
	WithCustomAttributes     *bool             `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
	WithIssuesEnabled        *bool             `url:"with_issues_enabled,omitempty" json:"with_issues_enabled,omitempty"`
	WithMergeRequestsEnabled *bool             `url:"with_merge_requests_enabled,omitempty" json:"with_merge_requests_enabled,omitempty"`
	WithProgrammingLanguage  *string           `url:"with_programming_language,omitempty" json:"with_programming_language,omitempty"`
	WikiChecksumFailed       *bool             `url:"wiki_checksum_failed,omitempty" json:"wiki_checksum_failed,omitempty"`
	RepositoryChecksumFailed *bool             `url:"repository_checksum_failed,omitempty" json:"repository_checksum_failed,omitempty"`
	MinAccessLevel           *AccessLevelValue `url:"min_access_level,omitempty" json:"min_access_level,omitempty"`
	IDAfter                  *int              `url:"id_after,omitempty" json:"id_after,omitempty"`
	IDBefore                 *int              `url:"id_before,omitempty" json:"id_before,omitempty"`
	LastActivityAfter        *time.Time        `url:"last_activity_after,omitempty" json:"last_activity_after,omitempty"`
	LastActivityBefore       *time.Time        `url:"last_activity_before,omitempty" json:"last_activity_before,omitempty"`
}

ListProjectsOptions represents the available ListProjects() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-projects

type ListProtectedBranchesOptions added in v0.8.1

type ListProtectedBranchesOptions ListOptions

ListProtectedBranchesOptions represents the available ListProtectedBranches() options.

GitLab API docs: https://docs.gitlab.com/ce/api/protected_branches.html#list-protected-branches

type ListProtectedTagsOptions added in v0.39.1

type ListProtectedTagsOptions ListOptions

ListProtectedTagsOptions represents the available ListProtectedTags() options.

GitLab API docs: https://docs.gitlab.com/ee/api/protected_tags.html#list-protected-tags

type ListRegistryRepositoriesOptions added in v0.39.1

type ListRegistryRepositoriesOptions ListOptions

ListRegistryRepositoriesOptions represents the available ListRegistryRepositories() options.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html#list-registry-repositories

type ListRegistryRepositoryTagsOptions added in v0.39.1

type ListRegistryRepositoryTagsOptions ListOptions

ListRegistryRepositoryTagsOptions represents the available ListRegistryRepositoryTags() options.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html#list-repository-tags

type ListReleaseLinksOptions added in v0.39.1

type ListReleaseLinksOptions ListOptions

ListReleaseLinksOptions represents ListReleaseLinks() options.

GitLab API docs: https://docs.gitlab.com/ee/api/releases/links.html#get-links

type ListReleasesOptions added in v0.39.1

type ListReleasesOptions ListOptions

ListReleasesOptions represents ListReleases() options.

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#list-releases

type ListRunnerJobsOptions added in v0.8.0

type ListRunnerJobsOptions struct {
	ListOptions
	Status  *string `url:"status,omitempty" json:"status,omitempty"`
	OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort    *string `url:"sort,omitempty" json:"sort,omitempty"`
}

ListRunnerJobsOptions represents the available ListRunnerJobs() options. Status can be one of: running, success, failed, canceled.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#list-runners-jobs

type ListRunnersOptions added in v0.7.5

type ListRunnersOptions struct {
	ListOptions
	Scope   *string  `url:"scope,omitempty" json:"scope,omitempty"`
	Type    *string  `url:"type,omitempty" json:"type,omitempty"`
	Status  *string  `url:"status,omitempty" json:"status,omitempty"`
	TagList []string `url:"tag_list,comma,omitempty" json:"tag_list,omitempty"`
}

ListRunnersOptions represents the available ListRunners() options.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#list-owned-runners

type ListSSHKeysForUserOptions added in v0.8.1

type ListSSHKeysForUserOptions ListOptions

ListSSHKeysForUserOptions represents the available ListSSHKeysForUser() options.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-ssh-keys-for-user

type ListSnippetDiscussionsOptions added in v0.11.2

type ListSnippetDiscussionsOptions ListOptions

ListSnippetDiscussionsOptions represents the available ListSnippetDiscussions() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#list-project-snippet-discussion-items

type ListSnippetNotesOptions added in v0.8.1

type ListSnippetNotesOptions struct {
	ListOptions
	OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort    *string `url:"sort,omitempty" json:"sort,omitempty"`
}

ListSnippetNotesOptions represents the available ListSnippetNotes() options.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#list-all-snippet-notes

type ListSnippetsOptions

type ListSnippetsOptions ListOptions

ListSnippetsOptions represents the available ListSnippets() options.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#list-snippets

type ListSubgroupsOptions added in v0.7.5

type ListSubgroupsOptions ListGroupsOptions

ListSubgroupsOptions represents the available ListSubgroups() options.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#list-a-groups-s-subgroups

type ListTagsOptions added in v0.7.4

type ListTagsOptions struct {
	ListOptions
	OrderBy *string `url:"order_by,omitempty" json:"order_by,omitempty"`
	Search  *string `url:"search,omitempty" json:"search,omitempty"`
	Sort    *string `url:"sort,omitempty" json:"sort,omitempty"`
}

ListTagsOptions represents the available ListTags() options.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html#list-project-repository-tags

type ListTemplatesOptions added in v0.9.0

type ListTemplatesOptions ListOptions

ListTemplatesOptions represents the available ListAllTemplates() options.

GitLab API docs: https://docs.gitlab.com/ce/api/templates/gitignores.html#list-gitignore-templates

type ListTodosOptions added in v0.6.0

type ListTodosOptions struct {
	ListOptions
	Action    *TodoAction `url:"action,omitempty" json:"action,omitempty"`
	AuthorID  *int        `url:"author_id,omitempty" json:"author_id,omitempty"`
	ProjectID *int        `url:"project_id,omitempty" json:"project_id,omitempty"`
	State     *string     `url:"state,omitempty" json:"state,omitempty"`
	Type      *string     `url:"type,omitempty" json:"type,omitempty"`
}

ListTodosOptions represents the available ListTodos() options.

GitLab API docs: https://docs.gitlab.com/ce/api/todos.html#get-a-list-of-todos

type ListTreeOptions

type ListTreeOptions struct {
	ListOptions
	Path      *string `url:"path,omitempty" json:"path,omitempty"`
	Ref       *string `url:"ref,omitempty" json:"ref,omitempty"`
	Recursive *bool   `url:"recursive,omitempty" json:"recursive,omitempty"`
}

ListTreeOptions represents the available ListTree() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#list-repository-tree

type ListUsersOptions

type ListUsersOptions struct {
	ListOptions
	Active  *bool `url:"active,omitempty" json:"active,omitempty"`
	Blocked *bool `url:"blocked,omitempty" json:"blocked,omitempty"`

	// The options below are only available for admins.
	Search               *string    `url:"search,omitempty" json:"search,omitempty"`
	Username             *string    `url:"username,omitempty" json:"username,omitempty"`
	ExternalUID          *string    `url:"extern_uid,omitempty" json:"extern_uid,omitempty"`
	Provider             *string    `url:"provider,omitempty" json:"provider,omitempty"`
	CreatedBefore        *time.Time `url:"created_before,omitempty" json:"created_before,omitempty"`
	CreatedAfter         *time.Time `url:"created_after,omitempty" json:"created_after,omitempty"`
	OrderBy              *string    `url:"order_by,omitempty" json:"order_by,omitempty"`
	Sort                 *string    `url:"sort,omitempty" json:"sort,omitempty"`
	External             *bool      `url:"external,omitempty" json:"external,omitempty"`
	WithCustomAttributes *bool      `url:"with_custom_attributes,omitempty" json:"with_custom_attributes,omitempty"`
}

ListUsersOptions represents the available ListUsers() options.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-users

type ListWikisOptions added in v0.7.0

type ListWikisOptions struct {
	WithContent *bool `url:"with_content,omitempty" json:"with_content,omitempty"`
}

ListWikisOptions represents the available ListWikis options.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html#list-wiki-pages

type ManagementProject added in v0.39.1

type ManagementProject struct {
	ID                int        `json:"id"`
	Description       string     `json:"description"`
	Name              string     `json:"name"`
	NameWithNamespace string     `json:"name_with_namespace"`
	Path              string     `json:"path"`
	PathWithNamespace string     `json:"path_with_namespace"`
	CreatedAt         *time.Time `json:"created_at"`
}

ManagementProject represents a GitLab Project Cluster management_project.

type MergeAssignee added in v0.39.1

type MergeAssignee struct {
	Name      string `json:"name"`
	Username  string `json:"username"`
	AvatarURL string `json:"avatar_url"`
}

MergeAssignee represents a merge assignee.

type MergeBaseOptions added in v0.39.1

type MergeBaseOptions struct {
	Ref []string `url:"refs[],omitempty" json:"refs,omitempty"`
}

MergeBaseOptions represents the available MergeBase() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#merge-base

type MergeCommentEvent added in v0.3.1

type MergeCommentEvent struct {
	ObjectKind string `json:"object_kind"`
	User       *User  `json:"user"`
	ProjectID  int    `json:"project_id"`
	Project    struct {
		Name              string          `json:"name"`
		Description       string          `json:"description"`
		AvatarURL         string          `json:"avatar_url"`
		GitSSHURL         string          `json:"git_ssh_url"`
		GitHTTPURL        string          `json:"git_http_url"`
		Namespace         string          `json:"namespace"`
		PathWithNamespace string          `json:"path_with_namespace"`
		DefaultBranch     string          `json:"default_branch"`
		Homepage          string          `json:"homepage"`
		URL               string          `json:"url"`
		SSHURL            string          `json:"ssh_url"`
		HTTPURL           string          `json:"http_url"`
		WebURL            string          `json:"web_url"`
		Visibility        VisibilityValue `json:"visibility"`
	} `json:"project"`
	ObjectAttributes struct {
		ID           int    `json:"id"`
		DiscussionID string `json:"discussion_id"`
		Note         string `json:"note"`
		NoteableType string `json:"noteable_type"`
		AuthorID     int    `json:"author_id"`
		CreatedAt    string `json:"created_at"`
		UpdatedAt    string `json:"updated_at"`
		ProjectID    int    `json:"project_id"`
		Attachment   string `json:"attachment"`
		LineCode     string `json:"line_code"`
		CommitID     string `json:"commit_id"`
		NoteableID   int    `json:"noteable_id"`
		System       bool   `json:"system"`
		StDiff       *Diff  `json:"st_diff"`
		URL          string `json:"url"`
	} `json:"object_attributes"`
	Repository   *Repository `json:"repository"`
	MergeRequest struct {
		ID                        int          `json:"id"`
		TargetBranch              string       `json:"target_branch"`
		SourceBranch              string       `json:"source_branch"`
		SourceProjectID           int          `json:"source_project_id"`
		AuthorID                  int          `json:"author_id"`
		AssigneeID                int          `json:"assignee_id"`
		AssigneeIDs               []int        `json:"assignee_ids"`
		Title                     string       `json:"title"`
		CreatedAt                 string       `json:"created_at"`
		UpdatedAt                 string       `json:"updated_at"`
		MilestoneID               int          `json:"milestone_id"`
		State                     string       `json:"state"`
		MergeStatus               string       `json:"merge_status"`
		TargetProjectID           int          `json:"target_project_id"`
		IID                       int          `json:"iid"`
		Description               string       `json:"description"`
		Position                  int          `json:"position"`
		LockedAt                  string       `json:"locked_at"`
		UpdatedByID               int          `json:"updated_by_id"`
		MergeError                string       `json:"merge_error"`
		MergeParams               *MergeParams `json:"merge_params"`
		MergeWhenPipelineSucceeds bool         `json:"merge_when_pipeline_succeeds"`
		MergeUserID               int          `json:"merge_user_id"`
		MergeCommitSHA            string       `json:"merge_commit_sha"`
		DeletedAt                 string       `json:"deleted_at"`
		InProgressMergeCommitSHA  string       `json:"in_progress_merge_commit_sha"`
		LockVersion               int          `json:"lock_version"`
		ApprovalsBeforeMerge      string       `json:"approvals_before_merge"`
		RebaseCommitSHA           string       `json:"rebase_commit_sha"`
		TimeEstimate              int          `json:"time_estimate"`
		Squash                    bool         `json:"squash"`
		LastEditedAt              string       `json:"last_edited_at"`
		LastEditedByID            int          `json:"last_edited_by_id"`
		Source                    *Repository  `json:"source"`
		Target                    *Repository  `json:"target"`
		LastCommit                struct {
			ID        string     `json:"id"`
			Message   string     `json:"message"`
			Timestamp *time.Time `json:"timestamp"`
			URL       string     `json:"url"`
			Author    struct {
				Name  string `json:"name"`
				Email string `json:"email"`
			} `json:"author"`
		} `json:"last_commit"`
		WorkInProgress bool `json:"work_in_progress"`
		TotalTimeSpent int  `json:"total_time_spent"`
		HeadPipelineID int  `json:"head_pipeline_id"`
	} `json:"merge_request"`
}

MergeCommentEvent represents a comment on a merge event.

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#comment-on-merge-request

type MergeEvent added in v0.3.1

type MergeEvent struct {
	ObjectKind string `json:"object_kind"`
	User       *User  `json:"user"`
	Project    struct {
		ID                int             `json:"id"`
		Name              string          `json:"name"`
		Description       string          `json:"description"`
		AvatarURL         string          `json:"avatar_url"`
		GitSSHURL         string          `json:"git_ssh_url"`
		GitHTTPURL        string          `json:"git_http_url"`
		Namespace         string          `json:"namespace"`
		PathWithNamespace string          `json:"path_with_namespace"`
		DefaultBranch     string          `json:"default_branch"`
		Homepage          string          `json:"homepage"`
		URL               string          `json:"url"`
		SSHURL            string          `json:"ssh_url"`
		HTTPURL           string          `json:"http_url"`
		WebURL            string          `json:"web_url"`
		Visibility        VisibilityValue `json:"visibility"`
	} `json:"project"`
	ObjectAttributes struct {
		ID                       int          `json:"id"`
		TargetBranch             string       `json:"target_branch"`
		SourceBranch             string       `json:"source_branch"`
		SourceProjectID          int          `json:"source_project_id"`
		AuthorID                 int          `json:"author_id"`
		AssigneeID               int          `json:"assignee_id"`
		AssigneeIDs              []int        `json:"assignee_ids"`
		Title                    string       `json:"title"`
		CreatedAt                string       `json:"created_at"` // Should be *time.Time (see Gitlab issue #21468)
		UpdatedAt                string       `json:"updated_at"` // Should be *time.Time (see Gitlab issue #21468)
		StCommits                []*Commit    `json:"st_commits"`
		StDiffs                  []*Diff      `json:"st_diffs"`
		MilestoneID              int          `json:"milestone_id"`
		State                    string       `json:"state"`
		MergeStatus              string       `json:"merge_status"`
		TargetProjectID          int          `json:"target_project_id"`
		IID                      int          `json:"iid"`
		Description              string       `json:"description"`
		Position                 int          `json:"position"`
		LockedAt                 string       `json:"locked_at"`
		UpdatedByID              int          `json:"updated_by_id"`
		MergeError               string       `json:"merge_error"`
		MergeParams              *MergeParams `json:"merge_params"`
		MergeWhenBuildSucceeds   bool         `json:"merge_when_build_succeeds"`
		MergeUserID              int          `json:"merge_user_id"`
		MergeCommitSHA           string       `json:"merge_commit_sha"`
		DeletedAt                string       `json:"deleted_at"`
		ApprovalsBeforeMerge     string       `json:"approvals_before_merge"`
		RebaseCommitSHA          string       `json:"rebase_commit_sha"`
		InProgressMergeCommitSHA string       `json:"in_progress_merge_commit_sha"`
		LockVersion              int          `json:"lock_version"`
		TimeEstimate             int          `json:"time_estimate"`
		Source                   *Repository  `json:"source"`
		Target                   *Repository  `json:"target"`
		LastCommit               struct {
			ID        string     `json:"id"`
			Message   string     `json:"message"`
			Timestamp *time.Time `json:"timestamp"`
			URL       string     `json:"url"`
			Author    struct {
				Name  string `json:"name"`
				Email string `json:"email"`
			} `json:"author"`
		} `json:"last_commit"`
		WorkInProgress bool          `json:"work_in_progress"`
		URL            string        `json:"url"`
		Action         string        `json:"action"`
		OldRev         string        `json:"oldrev"`
		Assignee       MergeAssignee `json:"assignee"`
	} `json:"object_attributes"`
	Repository *Repository   `json:"repository"`
	Assignee   MergeAssignee `json:"assignee"`
	Labels     []Label       `json:"labels"`
	Changes    struct {
		Assignees struct {
			Previous []MergeAssignee `json:"previous"`
			Current  []MergeAssignee `json:"current"`
		} `json:"assignees"`
		Description struct {
			Previous string `json:"previous"`
			Current  string `json:"current"`
		} `json:"description"`
		Labels struct {
			Previous []Label `json:"previous"`
			Current  []Label `json:"current"`
		} `json:"labels"`
		SourceBranch struct {
			Previous string `json:"previous"`
			Current  string `json:"current"`
		} `json:"source_branch"`
		SourceProjectID struct {
			Previous int `json:"previous"`
			Current  int `json:"current"`
		} `json:"source_project_id"`
		StateID struct {
			Previous int `json:"previous"`
			Current  int `json:"current"`
		} `json:"state_id"`
		TargetBranch struct {
			Previous string `json:"previous"`
			Current  string `json:"current"`
		} `json:"target_branch"`
		TargetProjectID struct {
			Previous int `json:"previous"`
			Current  int `json:"current"`
		} `json:"target_project_id"`
		Title struct {
			Previous string `json:"previous"`
			Current  string `json:"current"`
		} `json:"title"`
		UpdatedByID struct {
			Previous int `json:"previous"`
			Current  int `json:"current"`
		} `json:"updated_by_id"`
	} `json:"changes"`
}

MergeEvent represents a merge event.

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#merge-request-events

type MergeMethodValue added in v0.10.5

type MergeMethodValue string

MergeMethodValue represents a project merge type within GitLab.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#project-merge-method

const (
	NoFastForwardMerge MergeMethodValue = "merge"
	FastForwardMerge   MergeMethodValue = "ff"
	RebaseMerge        MergeMethodValue = "rebase_merge"
)

List of available merge type

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#project-merge-method

func MergeMethod added in v0.10.5

func MergeMethod(v MergeMethodValue) *MergeMethodValue

MergeMethod is a helper routine that allocates a new MergeMethod to sotre v and returns a pointer to it.

type MergeParams added in v0.39.1

type MergeParams struct {
	ForceRemoveSourceBranch bool `json:"force_remove_source_branch"`
}

MergeParams represents the merge params.

func (*MergeParams) UnmarshalJSON added in v0.39.1

func (p *MergeParams) UnmarshalJSON(b []byte) error

UnmarshalJSON decodes the merge parameters

This allows support of ForceRemoveSourceBranch for both type bool (>11.9) and string (<11.9)

type MergeRequest

type MergeRequest struct {
	ID                        int          `json:"id"`
	IID                       int          `json:"iid"`
	TargetBranch              string       `json:"target_branch"`
	SourceBranch              string       `json:"source_branch"`
	ProjectID                 int          `json:"project_id"`
	Title                     string       `json:"title"`
	State                     string       `json:"state"`
	CreatedAt                 *time.Time   `json:"created_at"`
	UpdatedAt                 *time.Time   `json:"updated_at"`
	Upvotes                   int          `json:"upvotes"`
	Downvotes                 int          `json:"downvotes"`
	Author                    *BasicUser   `json:"author"`
	Assignee                  *BasicUser   `json:"assignee"`
	Assignees                 []*BasicUser `json:"assignees"`
	SourceProjectID           int          `json:"source_project_id"`
	TargetProjectID           int          `json:"target_project_id"`
	Labels                    Labels       `json:"labels"`
	Description               string       `json:"description"`
	WorkInProgress            bool         `json:"work_in_progress"`
	Milestone                 *Milestone   `json:"milestone"`
	MergeWhenPipelineSucceeds bool         `json:"merge_when_pipeline_succeeds"`
	MergeStatus               string       `json:"merge_status"`
	MergeError                string       `json:"merge_error"`
	MergedBy                  *BasicUser   `json:"merged_by"`
	MergedAt                  *time.Time   `json:"merged_at"`
	ClosedBy                  *BasicUser   `json:"closed_by"`
	ClosedAt                  *time.Time   `json:"closed_at"`
	Subscribed                bool         `json:"subscribed"`
	SHA                       string       `json:"sha"`
	MergeCommitSHA            string       `json:"merge_commit_sha"`
	SquashCommitSHA           string       `json:"squash_commit_sha"`
	UserNotesCount            int          `json:"user_notes_count"`
	ChangesCount              string       `json:"changes_count"`
	ShouldRemoveSourceBranch  bool         `json:"should_remove_source_branch"`
	ForceRemoveSourceBranch   bool         `json:"force_remove_source_branch"`
	WebURL                    string       `json:"web_url"`
	DiscussionLocked          bool         `json:"discussion_locked"`
	Changes                   []struct {
		OldPath     string `json:"old_path"`
		NewPath     string `json:"new_path"`
		AMode       string `json:"a_mode"`
		BMode       string `json:"b_mode"`
		Diff        string `json:"diff"`
		NewFile     bool   `json:"new_file"`
		RenamedFile bool   `json:"renamed_file"`
		DeletedFile bool   `json:"deleted_file"`
	} `json:"changes"`
	User struct {
		CanMerge bool `json:"can_merge"`
	} `json:"user"`
	TimeStats    *TimeStats    `json:"time_stats"`
	Squash       bool          `json:"squash"`
	Pipeline     *PipelineInfo `json:"pipeline"`
	HeadPipeline *Pipeline     `json:"head_pipeline"`
	DiffRefs     struct {
		BaseSha  string `json:"base_sha"`
		HeadSha  string `json:"head_sha"`
		StartSha string `json:"start_sha"`
	} `json:"diff_refs"`
	DivergedCommitsCount int    `json:"diverged_commits_count"`
	RebaseInProgress     bool   `json:"rebase_in_progress"`
	ApprovalsBeforeMerge int    `json:"approvals_before_merge"`
	Reference            string `json:"reference"`
	TaskCompletionStatus struct {
		Count          int `json:"count"`
		CompletedCount int `json:"completed_count"`
	} `json:"task_completion_status"`
	HasConflicts bool `json:"has_conflicts"`
}

MergeRequest represents a GitLab merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html

func (MergeRequest) String

func (m MergeRequest) String() string

type MergeRequestApprovalRule added in v0.39.1

type MergeRequestApprovalRule struct {
	ID                   int                  `json:"id"`
	Name                 string               `json:"name"`
	RuleType             string               `json:"rule_type"`
	EligibleApprovers    []*BasicUser         `json:"eligible_approvers"`
	ApprovalsRequired    int                  `json:"approvals_required"`
	SourceRule           *ProjectApprovalRule `json:"source_rule"`
	Users                []*BasicUser         `json:"users"`
	Groups               []*Group             `json:"groups"`
	ContainsHiddenGroups bool                 `json:"contains_hidden_groups"`
	ApprovedBy           []*BasicUser         `json:"approved_by"`
	Approved             bool                 `json:"approved"`
}

MergeRequestApprovalRule represents a GitLab merge request approval rule.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-merge-request-level-rules

func (MergeRequestApprovalRule) String added in v0.39.1

func (s MergeRequestApprovalRule) String() string

String is a stringify for MergeRequestApprovalRule

type MergeRequestApprovalState added in v0.39.1

type MergeRequestApprovalState struct {
	ApprovalRulesOverwritten bool                        `json:"approval_rules_overwritten"`
	Rules                    []*MergeRequestApprovalRule `json:"rules"`
}

MergeRequestApprovalState represents a GitLab merge request approval state.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-the-approval-state-of-merge-requests

type MergeRequestApprovals added in v0.6.2

type MergeRequestApprovals struct {
	ID                   int                          `json:"id"`
	ProjectID            int                          `json:"project_id"`
	Title                string                       `json:"title"`
	Description          string                       `json:"description"`
	State                string                       `json:"state"`
	CreatedAt            *time.Time                   `json:"created_at"`
	UpdatedAt            *time.Time                   `json:"updated_at"`
	MergeStatus          string                       `json:"merge_status"`
	ApprovalsBeforeMerge int                          `json:"approvals_before_merge"`
	ApprovalsRequired    int                          `json:"approvals_required"`
	ApprovalsLeft        int                          `json:"approvals_left"`
	ApprovedBy           []*MergeRequestApproverUser  `json:"approved_by"`
	Approvers            []*MergeRequestApproverUser  `json:"approvers"`
	ApproverGroups       []*MergeRequestApproverGroup `json:"approver_groups"`
	SuggestedApprovers   []*BasicUser                 `json:"suggested_approvers"`
}

MergeRequestApprovals represents GitLab merge request approvals.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals

func (MergeRequestApprovals) String added in v0.6.2

func (m MergeRequestApprovals) String() string

type MergeRequestApprovalsService added in v0.10.0

type MergeRequestApprovalsService struct {
	// contains filtered or unexported fields
}

MergeRequestApprovalsService handles communication with the merge request approvals related methods of the GitLab API. This includes reading/updating approval settings and approve/unapproving merge requests

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html

func (*MergeRequestApprovalsService) ApproveMergeRequest added in v0.10.0

func (s *MergeRequestApprovalsService) ApproveMergeRequest(pid interface{}, mr int, opt *ApproveMergeRequestOptions, options ...RequestOptionFunc) (*MergeRequestApprovals, *Response, error)

ApproveMergeRequest approves a merge request on GitLab. If a non-empty sha is provided then it must match the sha at the HEAD of the MR.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#approve-merge-request

func (*MergeRequestApprovalsService) ChangeAllowedApprovers added in v0.39.1

func (s *MergeRequestApprovalsService) ChangeAllowedApprovers(pid interface{}, mergeRequest int, opt *ChangeMergeRequestAllowedApproversOptions, options ...RequestOptionFunc) (*MergeRequest, *Response, error)

ChangeAllowedApprovers updates the approvers for a merge request.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#change-allowed-approvers-for-merge-request

func (*MergeRequestApprovalsService) ChangeApprovalConfiguration added in v0.39.1

func (s *MergeRequestApprovalsService) ChangeApprovalConfiguration(pid interface{}, mergeRequest int, opt *ChangeMergeRequestApprovalConfigurationOptions, options ...RequestOptionFunc) (*MergeRequest, *Response, error)

ChangeApprovalConfiguration updates the approval configuration of a merge request.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#change-approval-configuration

func (*MergeRequestApprovalsService) CreateApprovalRule added in v0.39.1

func (s *MergeRequestApprovalsService) CreateApprovalRule(pid interface{}, mergeRequest int, opt *CreateMergeRequestApprovalRuleOptions, options ...RequestOptionFunc) (*MergeRequestApprovalRule, *Response, error)

CreateApprovalRule creates a new MR level approval rule.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-merge-request-level-rule

func (*MergeRequestApprovalsService) DeleteApprovalRule added in v0.39.1

func (s *MergeRequestApprovalsService) DeleteApprovalRule(pid interface{}, mergeRequest int, approvalRule int, options ...RequestOptionFunc) (*Response, error)

DeleteApprovalRule deletes a mr level approval rule.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#delete-merge-request-level-rule

func (*MergeRequestApprovalsService) GetApprovalRules added in v0.39.1

func (s *MergeRequestApprovalsService) GetApprovalRules(pid interface{}, mergeRequest int, options ...RequestOptionFunc) ([]*MergeRequestApprovalRule, *Response, error)

GetApprovalRules requests information about a merge request’s approval rules

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-merge-request-level-rules

func (*MergeRequestApprovalsService) GetApprovalState added in v0.39.1

func (s *MergeRequestApprovalsService) GetApprovalState(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*MergeRequestApprovalState, *Response, error)

GetApprovalState requests information about a merge request’s approval state

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-the-approval-state-of-merge-requests

func (*MergeRequestApprovalsService) GetConfiguration added in v0.39.1

func (s *MergeRequestApprovalsService) GetConfiguration(pid interface{}, mr int, options ...RequestOptionFunc) (*MergeRequestApprovals, *Response, error)

GetConfiguration shows information about single merge request approvals

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-configuration-1

func (*MergeRequestApprovalsService) UnapproveMergeRequest added in v0.10.0

func (s *MergeRequestApprovalsService) UnapproveMergeRequest(pid interface{}, mr int, options ...RequestOptionFunc) (*Response, error)

UnapproveMergeRequest unapproves a previously approved merge request on GitLab.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#unapprove-merge-request

func (*MergeRequestApprovalsService) UpdateApprovalRule added in v0.39.1

func (s *MergeRequestApprovalsService) UpdateApprovalRule(pid interface{}, mergeRequest int, approvalRule int, opt *UpdateMergeRequestApprovalRuleOptions, options ...RequestOptionFunc) (*MergeRequestApprovalRule, *Response, error)

UpdateApprovalRule updates an existing approval rule with new options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#update-merge-request-level-rule

type MergeRequestApproverGroup added in v0.39.1

type MergeRequestApproverGroup struct {
	Group struct {
		ID                   int    `json:"id"`
		Name                 string `json:"name"`
		Path                 string `json:"path"`
		Description          string `json:"description"`
		Visibility           string `json:"visibility"`
		AvatarURL            string `json:"avatar_url"`
		WebURL               string `json:"web_url"`
		FullName             string `json:"full_name"`
		FullPath             string `json:"full_path"`
		LFSEnabled           bool   `json:"lfs_enabled"`
		RequestAccessEnabled bool   `json:"request_access_enabled"`
	}
}

MergeRequestApproverGroup represents GitLab project level merge request approver group.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#project-level-mr-approvals

type MergeRequestApproverUser added in v0.39.1

type MergeRequestApproverUser struct {
	User *BasicUser
}

MergeRequestApproverUser represents GitLab project level merge request approver user.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#project-level-mr-approvals

type MergeRequestDiffVersion added in v0.7.4

type MergeRequestDiffVersion struct {
	ID             int        `json:"id"`
	HeadCommitSHA  string     `json:"head_commit_sha,omitempty"`
	BaseCommitSHA  string     `json:"base_commit_sha,omitempty"`
	StartCommitSHA string     `json:"start_commit_sha,omitempty"`
	CreatedAt      *time.Time `json:"created_at,omitempty"`
	MergeRequestID int        `json:"merge_request_id,omitempty"`
	State          string     `json:"state,omitempty"`
	RealSize       string     `json:"real_size,omitempty"`
	Commits        []*Commit  `json:"commits,omitempty"`
	Diffs          []*Diff    `json:"diffs,omitempty"`
}

MergeRequestDiffVersion represents Gitlab merge request version.

Gitlab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#get-a-single-mr-diff-version

func (MergeRequestDiffVersion) String added in v0.7.4

func (m MergeRequestDiffVersion) String() string

type MergeRequestsService

type MergeRequestsService struct {
	// contains filtered or unexported fields
}

MergeRequestsService handles communication with the merge requests related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html

func (*MergeRequestsService) AcceptMergeRequest

func (s *MergeRequestsService) AcceptMergeRequest(pid interface{}, mergeRequest int, opt *AcceptMergeRequestOptions, options ...RequestOptionFunc) (*MergeRequest, *Response, error)

AcceptMergeRequest merges changes submitted with MR using this API. If merge success you get 200 OK. If it has some conflicts and can not be merged - you get 405 and error message 'Branch cannot be merged'. If merge request is already merged or closed - you get 405 and error message 'Method Not Allowed'

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#accept-mr

func (*MergeRequestsService) AddSpentTime added in v0.6.0

func (s *MergeRequestsService) AddSpentTime(pid interface{}, mergeRequest int, opt *AddSpentTimeOptions, options ...RequestOptionFunc) (*TimeStats, *Response, error)

AddSpentTime adds spent time for a single project merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#add-spent-time-for-a-merge-request

func (*MergeRequestsService) CancelMergeWhenPipelineSucceeds added in v0.7.4

func (s *MergeRequestsService) CancelMergeWhenPipelineSucceeds(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*MergeRequest, *Response, error)

CancelMergeWhenPipelineSucceeds cancels a merge when pipeline succeeds. If you don't have permissions to accept this merge request - you'll get a 401. If the merge request is already merged or closed - you get 405 and error message 'Method Not Allowed'. In case the merge request is not set to be merged when the pipeline succeeds, you'll also get a 406 error.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#cancel-merge-when-pipeline-succeeds

func (*MergeRequestsService) CreateMergeRequest

func (s *MergeRequestsService) CreateMergeRequest(pid interface{}, opt *CreateMergeRequestOptions, options ...RequestOptionFunc) (*MergeRequest, *Response, error)

CreateMergeRequest creates a new merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#create-mr

func (*MergeRequestsService) CreateMergeRequestPipeline added in v0.39.1

func (s *MergeRequestsService) CreateMergeRequestPipeline(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*PipelineInfo, *Response, error)

CreateMergeRequestPipeline creates a new pipeline for a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#create-mr-pipeline

func (*MergeRequestsService) CreateTodo added in v0.7.4

func (s *MergeRequestsService) CreateTodo(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*Todo, *Response, error)

CreateTodo manually creates a todo for the current user on a merge request. If there already exists a todo for the user on that merge request, status code 304 is returned.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#create-a-todo

func (*MergeRequestsService) DeleteMergeRequest added in v0.7.4

func (s *MergeRequestsService) DeleteMergeRequest(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*Response, error)

DeleteMergeRequest deletes a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#delete-a-merge-request

func (*MergeRequestsService) GetIssuesClosedOnMerge added in v0.7.3

func (s *MergeRequestsService) GetIssuesClosedOnMerge(pid interface{}, mergeRequest int, opt *GetIssuesClosedOnMergeOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

GetIssuesClosedOnMerge gets all the issues that would be closed by merging the provided merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#list-issues-that-will-close-on-merge

func (*MergeRequestsService) GetMergeRequest

func (s *MergeRequestsService) GetMergeRequest(pid interface{}, mergeRequest int, opt *GetMergeRequestsOptions, options ...RequestOptionFunc) (*MergeRequest, *Response, error)

GetMergeRequest shows information about a single merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr

func (*MergeRequestsService) GetMergeRequestApprovals added in v0.6.2

func (s *MergeRequestsService) GetMergeRequestApprovals(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*MergeRequestApprovals, *Response, error)

GetMergeRequestApprovals gets information about a merge requests approvals

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#merge-request-level-mr-approvals

func (*MergeRequestsService) GetMergeRequestChanges

func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*MergeRequest, *Response, error)

GetMergeRequestChanges shows information about the merge request including its files and changes.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-changes

func (*MergeRequestsService) GetMergeRequestCommits added in v0.4.0

func (s *MergeRequestsService) GetMergeRequestCommits(pid interface{}, mergeRequest int, opt *GetMergeRequestCommitsOptions, options ...RequestOptionFunc) ([]*Commit, *Response, error)

GetMergeRequestCommits gets a list of merge request commits.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-commits

func (*MergeRequestsService) GetMergeRequestDiffVersions added in v0.7.4

func (s *MergeRequestsService) GetMergeRequestDiffVersions(pid interface{}, mergeRequest int, opt *GetMergeRequestDiffVersionsOptions, options ...RequestOptionFunc) ([]*MergeRequestDiffVersion, *Response, error)

GetMergeRequestDiffVersions get a list of merge request diff versions.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#get-mr-diff-versions

func (*MergeRequestsService) GetMergeRequestParticipants added in v0.39.1

func (s *MergeRequestsService) GetMergeRequestParticipants(pid interface{}, mergeRequest int, options ...RequestOptionFunc) ([]*BasicUser, *Response, error)

GetMergeRequestParticipants gets a list of merge request participants.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_requests.html#get-single-mr-participants

func (*MergeRequestsService) GetSingleMergeRequestDiffVersion added in v0.7.4

func (s *MergeRequestsService) GetSingleMergeRequestDiffVersion(pid interface{}, mergeRequest, version int, options ...RequestOptionFunc) (*MergeRequestDiffVersion, *Response, error)

GetSingleMergeRequestDiffVersion get a single MR diff version

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#get-a-single-mr-diff-version

func (*MergeRequestsService) GetTimeSpent added in v0.6.0

func (s *MergeRequestsService) GetTimeSpent(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*TimeStats, *Response, error)

GetTimeSpent gets the spent time for a single project merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#get-time-tracking-stats

func (*MergeRequestsService) ListGroupMergeRequests added in v0.11.1

func (s *MergeRequestsService) ListGroupMergeRequests(gid interface{}, opt *ListGroupMergeRequestsOptions, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

ListGroupMergeRequests gets all merge requests for this group.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#list-group-merge-requests

func (*MergeRequestsService) ListMergeRequestPipelines added in v0.9.0

func (s *MergeRequestsService) ListMergeRequestPipelines(pid interface{}, mergeRequest int, options ...RequestOptionFunc) ([]*PipelineInfo, *Response, error)

ListMergeRequestPipelines gets all pipelines for the provided merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#list-mr-pipelines

func (*MergeRequestsService) ListMergeRequests

func (s *MergeRequestsService) ListMergeRequests(opt *ListMergeRequestsOptions, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

ListMergeRequests gets all merge requests. The state parameter can be used to get only merge requests with a given state (opened, closed, or merged) or all of them (all). The pagination parameters page and per_page can be used to restrict the list of merge requests.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests

func (*MergeRequestsService) ListProjectMergeRequests added in v0.6.2

func (s *MergeRequestsService) ListProjectMergeRequests(pid interface{}, opt *ListProjectMergeRequestsOptions, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

ListProjectMergeRequests gets all merge requests for this project.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#list-project-merge-requests

func (*MergeRequestsService) RebaseMergeRequest added in v0.39.1

func (s *MergeRequestsService) RebaseMergeRequest(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*Response, error)

RebaseMergeRequest automatically rebases the source_branch of the merge request against its target_branch. If you don’t have permissions to push to the merge request’s source branch, you’ll get a 403 Forbidden response.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#rebase-a-merge-request

func (*MergeRequestsService) ResetSpentTime added in v0.6.0

func (s *MergeRequestsService) ResetSpentTime(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*TimeStats, *Response, error)

ResetSpentTime resets the spent time for a single project merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#reset-spent-time-for-a-merge-request

func (*MergeRequestsService) ResetTimeEstimate added in v0.6.0

func (s *MergeRequestsService) ResetTimeEstimate(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*TimeStats, *Response, error)

ResetTimeEstimate resets the time estimate for a single project merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#reset-the-time-estimate-for-a-merge-request

func (*MergeRequestsService) SetTimeEstimate added in v0.6.0

func (s *MergeRequestsService) SetTimeEstimate(pid interface{}, mergeRequest int, opt *SetTimeEstimateOptions, options ...RequestOptionFunc) (*TimeStats, *Response, error)

SetTimeEstimate sets the time estimate for a single project merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#set-a-time-estimate-for-a-merge-request

func (*MergeRequestsService) SubscribeToMergeRequest added in v0.7.4

func (s *MergeRequestsService) SubscribeToMergeRequest(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*MergeRequest, *Response, error)

SubscribeToMergeRequest subscribes the authenticated user to the given merge request to receive notifications. If the user is already subscribed to the merge request, the status code 304 is returned.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#subscribe-to-a-merge-request

func (*MergeRequestsService) UnsubscribeFromMergeRequest added in v0.7.4

func (s *MergeRequestsService) UnsubscribeFromMergeRequest(pid interface{}, mergeRequest int, options ...RequestOptionFunc) (*MergeRequest, *Response, error)

UnsubscribeFromMergeRequest unsubscribes the authenticated user from the given merge request to not receive notifications from that merge request. If the user is not subscribed to the merge request, status code 304 is returned.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#unsubscribe-from-a-merge-request

func (*MergeRequestsService) UpdateMergeRequest

func (s *MergeRequestsService) UpdateMergeRequest(pid interface{}, mergeRequest int, opt *UpdateMergeRequestOptions, options ...RequestOptionFunc) (*MergeRequest, *Response, error)

UpdateMergeRequest updates an existing project milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#update-mr

type MicrosoftTeamsService added in v0.11.0

type MicrosoftTeamsService struct {
	Service
	Properties *MicrosoftTeamsServiceProperties `json:"properties"`
}

MicrosoftTeamsService represents Microsoft Teams service settings.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#microsoft-teams

type MicrosoftTeamsServiceProperties added in v0.11.0

type MicrosoftTeamsServiceProperties struct {
	WebHook                   string    `json:"webhook"`
	NotifyOnlyBrokenPipelines BoolValue `json:"notify_only_broken_pipelines"`
	BranchesToBeNotified      string    `json:"branches_to_be_notified"`
	IssuesEvents              BoolValue `json:"issues_events"`
	ConfidentialIssuesEvents  BoolValue `json:"confidential_issues_events"`
	MergeRequestsEvents       BoolValue `json:"merge_requests_events"`
	TagPushEvents             BoolValue `json:"tag_push_events"`
	NoteEvents                BoolValue `json:"note_events"`
	ConfidentialNoteEvents    BoolValue `json:"confidential_note_events"`
	PipelineEvents            BoolValue `json:"pipeline_events"`
	WikiPageEvents            BoolValue `json:"wiki_page_events"`
}

MicrosoftTeamsServiceProperties represents Microsoft Teams specific properties.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#microsoft-teams

type Milestone

type Milestone struct {
	ID          int        `json:"id"`
	IID         int        `json:"iid"`
	ProjectID   int        `json:"project_id"`
	Title       string     `json:"title"`
	Description string     `json:"description"`
	StartDate   *ISOTime   `json:"start_date"`
	DueDate     *ISOTime   `json:"due_date"`
	State       string     `json:"state"`
	WebURL      string     `json:"web_url"`
	UpdatedAt   *time.Time `json:"updated_at"`
	CreatedAt   *time.Time `json:"created_at"`
	Expired     *bool      `json:"expired"`
}

Milestone represents a GitLab milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html

func (Milestone) String

func (m Milestone) String() string

type MilestonesService

type MilestonesService struct {
	// contains filtered or unexported fields
}

MilestonesService handles communication with the milestone related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html

func (*MilestonesService) CreateMilestone

func (s *MilestonesService) CreateMilestone(pid interface{}, opt *CreateMilestoneOptions, options ...RequestOptionFunc) (*Milestone, *Response, error)

CreateMilestone creates a new project milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#create-new-milestone

func (*MilestonesService) DeleteMilestone added in v0.10.0

func (s *MilestonesService) DeleteMilestone(pid interface{}, milestone int, options ...RequestOptionFunc) (*Response, error)

DeleteMilestone deletes a specified project milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#delete-project-milestone

func (*MilestonesService) GetMilestone

func (s *MilestonesService) GetMilestone(pid interface{}, milestone int, options ...RequestOptionFunc) (*Milestone, *Response, error)

GetMilestone gets a single project milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#get-single-milestone

func (*MilestonesService) GetMilestoneIssues

func (s *MilestonesService) GetMilestoneIssues(pid interface{}, milestone int, opt *GetMilestoneIssuesOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

GetMilestoneIssues gets all issues assigned to a single project milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone

func (*MilestonesService) GetMilestoneMergeRequests added in v0.10.0

func (s *MilestonesService) GetMilestoneMergeRequests(pid interface{}, milestone int, opt *GetMilestoneMergeRequestsOptions, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

GetMilestoneMergeRequests gets all merge requests assigned to a single project milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#get-all-merge-requests-assigned-to-a-single-milestone

func (*MilestonesService) ListMilestones

func (s *MilestonesService) ListMilestones(pid interface{}, opt *ListMilestonesOptions, options ...RequestOptionFunc) ([]*Milestone, *Response, error)

ListMilestones returns a list of project milestones.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#list-project-milestones

func (*MilestonesService) UpdateMilestone

func (s *MilestonesService) UpdateMilestone(pid interface{}, milestone int, opt *UpdateMilestoneOptions, options ...RequestOptionFunc) (*Milestone, *Response, error)

UpdateMilestone updates an existing project milestone.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#edit-milestone

type ModifyUserOptions

type ModifyUserOptions struct {
	Email              *string `url:"email,omitempty" json:"email,omitempty"`
	Password           *string `url:"password,omitempty" json:"password,omitempty"`
	Username           *string `url:"username,omitempty" json:"username,omitempty"`
	Name               *string `url:"name,omitempty" json:"name,omitempty"`
	Skype              *string `url:"skype,omitempty" json:"skype,omitempty"`
	Linkedin           *string `url:"linkedin,omitempty" json:"linkedin,omitempty"`
	Twitter            *string `url:"twitter,omitempty" json:"twitter,omitempty"`
	WebsiteURL         *string `url:"website_url,omitempty" json:"website_url,omitempty"`
	Organization       *string `url:"organization,omitempty" json:"organization,omitempty"`
	ProjectsLimit      *int    `url:"projects_limit,omitempty" json:"projects_limit,omitempty"`
	ExternUID          *string `url:"extern_uid,omitempty" json:"extern_uid,omitempty"`
	Provider           *string `url:"provider,omitempty" json:"provider,omitempty"`
	Bio                *string `url:"bio,omitempty" json:"bio,omitempty"`
	Location           *string `url:"location,omitempty" json:"location,omitempty"`
	Admin              *bool   `url:"admin,omitempty" json:"admin,omitempty"`
	CanCreateGroup     *bool   `url:"can_create_group,omitempty" json:"can_create_group,omitempty"`
	SkipReconfirmation *bool   `url:"skip_reconfirmation,omitempty" json:"skip_reconfirmation,omitempty"`
	External           *bool   `url:"external,omitempty" json:"external,omitempty"`
	PrivateProfile     *bool   `url:"private_profile,omitempty" json:"private_profile,omitempty"`
}

ModifyUserOptions represents the available ModifyUser() options.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-modification

type MoveIssueOptions added in v0.39.1

type MoveIssueOptions struct {
	ToProjectID *int `url:"to_project_id,omitempty" json:"to_project_id,omitempty"`
}

MoveIssueOptions represents the available MoveIssue() options.

GitLab API docs: https://docs.gitlab.com/ee/api/issues.html#move-an-issue

type Namespace

type 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"`
	MembersCountWithDescendants int    `json:"members_count_with_descendants"`
}

Namespace represents a GitLab namespace.

GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html

func (Namespace) String

func (n Namespace) String() string

type NamespacesService

type NamespacesService struct {
	// contains filtered or unexported fields
}

NamespacesService handles communication with the namespace related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html

func (*NamespacesService) GetNamespace added in v0.7.4

func (s *NamespacesService) GetNamespace(id interface{}, options ...RequestOptionFunc) (*Namespace, *Response, error)

GetNamespace gets a namespace by id.

GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#get-namespace-by-id

func (*NamespacesService) ListNamespaces

func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions, options ...RequestOptionFunc) ([]*Namespace, *Response, error)

ListNamespaces gets a list of projects accessible by the authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces

func (*NamespacesService) SearchNamespace

func (s *NamespacesService) SearchNamespace(query string, options ...RequestOptionFunc) ([]*Namespace, *Response, error)

SearchNamespace gets all namespaces that match your string in their name or path.

GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#search-for-namespace

type Note

type Note struct {
	ID         int    `json:"id"`
	Body       string `json:"body"`
	Attachment string `json:"attachment"`
	Title      string `json:"title"`
	FileName   string `json:"file_name"`
	Author     struct {
		ID        int    `json:"id"`
		Username  string `json:"username"`
		Email     string `json:"email"`
		Name      string `json:"name"`
		State     string `json:"state"`
		AvatarURL string `json:"avatar_url"`
		WebURL    string `json:"web_url"`
	} `json:"author"`
	System       bool          `json:"system"`
	ExpiresAt    *time.Time    `json:"expires_at"`
	UpdatedAt    *time.Time    `json:"updated_at"`
	CreatedAt    *time.Time    `json:"created_at"`
	NoteableID   int           `json:"noteable_id"`
	NoteableType string        `json:"noteable_type"`
	Position     *NotePosition `json:"position"`
	Resolvable   bool          `json:"resolvable"`
	Resolved     bool          `json:"resolved"`
	ResolvedBy   struct {
		ID        int    `json:"id"`
		Username  string `json:"username"`
		Email     string `json:"email"`
		Name      string `json:"name"`
		State     string `json:"state"`
		AvatarURL string `json:"avatar_url"`
		WebURL    string `json:"web_url"`
	} `json:"resolved_by"`
	NoteableIID int `json:"noteable_iid"`
}

Note represents a GitLab note.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html

func (Note) String

func (n Note) String() string

type NotePosition added in v0.11.2

type NotePosition struct {
	BaseSHA      string `json:"base_sha"`
	StartSHA     string `json:"start_sha"`
	HeadSHA      string `json:"head_sha"`
	PositionType string `json:"position_type"`
	NewPath      string `json:"new_path,omitempty"`
	NewLine      int    `json:"new_line,omitempty"`
	OldPath      string `json:"old_path,omitempty"`
	OldLine      int    `json:"old_line,omitempty"`
	Width        int    `json:"width,omitempty"`
	Height       int    `json:"height,omitempty"`
	X            int    `json:"x,omitempty"`
	Y            int    `json:"y,omitempty"`
}

NotePosition represents the position attributes of a note.

type NotesService

type NotesService struct {
	// contains filtered or unexported fields
}

NotesService handles communication with the notes related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html

func (*NotesService) CreateEpicNote added in v0.39.1

func (s *NotesService) CreateEpicNote(gid interface{}, epic int, opt *CreateEpicNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

CreateEpicNote creates a new note for a single merge request.

GitLab API docs: https://docs.gitlab.com/ee/api/notes.html#create-new-epic-note

func (*NotesService) CreateIssueNote

func (s *NotesService) CreateIssueNote(pid interface{}, issue int, opt *CreateIssueNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

CreateIssueNote creates a new note to a single project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#create-new-issue-note

func (*NotesService) CreateMergeRequestNote

func (s *NotesService) CreateMergeRequestNote(pid interface{}, mergeRequest int, opt *CreateMergeRequestNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

CreateMergeRequestNote creates a new note for a single merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#create-new-merge-request-note

func (*NotesService) CreateSnippetNote

func (s *NotesService) CreateSnippetNote(pid interface{}, snippet int, opt *CreateSnippetNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

CreateSnippetNote creates a new note for a single snippet. Snippet notes are comments users can post to a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#create-new-snippet-note

func (*NotesService) DeleteEpicNote added in v0.39.1

func (s *NotesService) DeleteEpicNote(gid interface{}, epic, note int, options ...RequestOptionFunc) (*Response, error)

DeleteEpicNote deletes an existing note of a merge request.

https://docs.gitlab.com/ee/api/notes.html#delete-an-epic-note

func (*NotesService) DeleteIssueNote added in v0.6.0

func (s *NotesService) DeleteIssueNote(pid interface{}, issue, note int, options ...RequestOptionFunc) (*Response, error)

DeleteIssueNote deletes an existing note of an issue.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#delete-an-issue-note

func (*NotesService) DeleteMergeRequestNote added in v0.6.0

func (s *NotesService) DeleteMergeRequestNote(pid interface{}, mergeRequest, note int, options ...RequestOptionFunc) (*Response, error)

DeleteMergeRequestNote deletes an existing note of a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#delete-a-merge-request-note

func (*NotesService) DeleteSnippetNote added in v0.6.0

func (s *NotesService) DeleteSnippetNote(pid interface{}, snippet, note int, options ...RequestOptionFunc) (*Response, error)

DeleteSnippetNote deletes an existing note of a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#delete-a-snippet-note

func (*NotesService) GetEpicNote added in v0.39.1

func (s *NotesService) GetEpicNote(gid interface{}, epic, note int, options ...RequestOptionFunc) (*Note, *Response, error)

GetEpicNote returns a single note for an epic.

GitLab API docs: https://docs.gitlab.com/ee/api/notes.html#get-single-epic-note

func (*NotesService) GetIssueNote

func (s *NotesService) GetIssueNote(pid interface{}, issue, note int, options ...RequestOptionFunc) (*Note, *Response, error)

GetIssueNote returns a single note for a specific project issue.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#get-single-issue-note

func (*NotesService) GetMergeRequestNote

func (s *NotesService) GetMergeRequestNote(pid interface{}, mergeRequest, note int, options ...RequestOptionFunc) (*Note, *Response, error)

GetMergeRequestNote returns a single note for a given merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#get-single-merge-request-note

func (*NotesService) GetSnippetNote

func (s *NotesService) GetSnippetNote(pid interface{}, snippet, note int, options ...RequestOptionFunc) (*Note, *Response, error)

GetSnippetNote returns a single note for a given snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#get-single-snippet-note

func (*NotesService) ListEpicNotes added in v0.39.1

func (s *NotesService) ListEpicNotes(gid interface{}, epic int, opt *ListEpicNotesOptions, options ...RequestOptionFunc) ([]*Note, *Response, error)

ListEpicNotes gets a list of all notes for a single epic.

GitLab API docs: https://docs.gitlab.com/ee/api/notes.html#list-all-epic-notes

func (*NotesService) ListIssueNotes

func (s *NotesService) ListIssueNotes(pid interface{}, issue int, opt *ListIssueNotesOptions, options ...RequestOptionFunc) ([]*Note, *Response, error)

ListIssueNotes gets a list of all notes for a single issue.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#list-project-issue-notes

func (*NotesService) ListMergeRequestNotes

func (s *NotesService) ListMergeRequestNotes(pid interface{}, mergeRequest int, opt *ListMergeRequestNotesOptions, options ...RequestOptionFunc) ([]*Note, *Response, error)

ListMergeRequestNotes gets a list of all notes for a single merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#list-all-merge-request-notes

func (*NotesService) ListSnippetNotes

func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int, opt *ListSnippetNotesOptions, options ...RequestOptionFunc) ([]*Note, *Response, error)

ListSnippetNotes gets a list of all notes for a single snippet. Snippet notes are comments users can post to a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#list-all-snippet-notes

func (*NotesService) UpdateEpicNote added in v0.39.1

func (s *NotesService) UpdateEpicNote(gid interface{}, epic, note int, opt *UpdateEpicNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

UpdateEpicNote modifies existing note of an epic.

https://docs.gitlab.com/ee/api/notes.html#modify-existing-epic-note

func (*NotesService) UpdateIssueNote

func (s *NotesService) UpdateIssueNote(pid interface{}, issue, note int, opt *UpdateIssueNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

UpdateIssueNote modifies existing note of an issue.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#modify-existing-issue-note

func (*NotesService) UpdateMergeRequestNote

func (s *NotesService) UpdateMergeRequestNote(pid interface{}, mergeRequest, note int, opt *UpdateMergeRequestNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

UpdateMergeRequestNote modifies existing note of a merge request.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note

func (*NotesService) UpdateSnippetNote

func (s *NotesService) UpdateSnippetNote(pid interface{}, snippet, note int, opt *UpdateSnippetNoteOptions, options ...RequestOptionFunc) (*Note, *Response, error)

UpdateSnippetNote modifies existing note of a snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#modify-existing-snippet-note

type NotificationEvents added in v0.4.0

type NotificationEvents struct {
	CloseIssue           bool `json:"close_issue"`
	CloseMergeRequest    bool `json:"close_merge_request"`
	FailedPipeline       bool `json:"failed_pipeline"`
	MergeMergeRequest    bool `json:"merge_merge_request"`
	NewIssue             bool `json:"new_issue"`
	NewMergeRequest      bool `json:"new_merge_request"`
	NewNote              bool `json:"new_note"`
	ReassignIssue        bool `json:"reassign_issue"`
	ReassignMergeRequest bool `json:"reassign_merge_request"`
	ReopenIssue          bool `json:"reopen_issue"`
	ReopenMergeRequest   bool `json:"reopen_merge_request"`
	SuccessPipeline      bool `json:"success_pipeline"`
}

NotificationEvents represents the available notification setting events.

GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html#notification-settings

type NotificationLevelValue added in v0.2.0

type NotificationLevelValue int

NotificationLevelValue represents a notification level.

const (
	DisabledNotificationLevel NotificationLevelValue = iota
	ParticipatingNotificationLevel
	WatchNotificationLevel
	GlobalNotificationLevel
	MentionNotificationLevel
	CustomNotificationLevel
)

List of valid notification levels.

func NotificationLevel

func NotificationLevel(v NotificationLevelValue) *NotificationLevelValue

NotificationLevel is a helper routine that allocates a new NotificationLevelValue to store v and returns a pointer to it.

func (NotificationLevelValue) MarshalJSON added in v0.4.0

func (l NotificationLevelValue) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface.

func (NotificationLevelValue) String added in v0.4.0

func (l NotificationLevelValue) String() string

String implements the fmt.Stringer interface.

func (*NotificationLevelValue) UnmarshalJSON added in v0.4.0

func (l *NotificationLevelValue) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

type NotificationSettings added in v0.4.0

type NotificationSettings struct {
	Level             NotificationLevelValue `json:"level"`
	NotificationEmail string                 `json:"notification_email"`
	Events            *NotificationEvents    `json:"events"`
}

NotificationSettings represents the Gitlab notification setting.

GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html#notification-settings

func (NotificationSettings) String added in v0.4.0

func (ns NotificationSettings) String() string

type NotificationSettingsOptions added in v0.4.0

type NotificationSettingsOptions struct {
	Level                *NotificationLevelValue `url:"level,omitempty" json:"level,omitempty"`
	NotificationEmail    *string                 `url:"notification_email,omitempty" json:"notification_email,omitempty"`
	CloseIssue           *bool                   `url:"close_issue,omitempty" json:"close_issue,omitempty"`
	CloseMergeRequest    *bool                   `url:"close_merge_request,omitempty" json:"close_merge_request,omitempty"`
	FailedPipeline       *bool                   `url:"failed_pipeline,omitempty" json:"failed_pipeline,omitempty"`
	MergeMergeRequest    *bool                   `url:"merge_merge_request,omitempty" json:"merge_merge_request,omitempty"`
	NewIssue             *bool                   `url:"new_issue,omitempty" json:"new_issue,omitempty"`
	NewMergeRequest      *bool                   `url:"new_merge_request,omitempty" json:"new_merge_request,omitempty"`
	NewNote              *bool                   `url:"new_note,omitempty" json:"new_note,omitempty"`
	ReassignIssue        *bool                   `url:"reassign_issue,omitempty" json:"reassign_issue,omitempty"`
	ReassignMergeRequest *bool                   `url:"reassign_merge_request,omitempty" json:"reassign_merge_request,omitempty"`
	ReopenIssue          *bool                   `url:"reopen_issue,omitempty" json:"reopen_issue,omitempty"`
	ReopenMergeRequest   *bool                   `url:"reopen_merge_request,omitempty" json:"reopen_merge_request,omitempty"`
	SuccessPipeline      *bool                   `url:"success_pipeline,omitempty" json:"success_pipeline,omitempty"`
}

NotificationSettingsOptions represents the available options that can be passed to the API when updating the notification settings.

type NotificationSettingsService added in v0.4.0

type NotificationSettingsService struct {
	// contains filtered or unexported fields
}

NotificationSettingsService handles communication with the notification settings related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html

func (*NotificationSettingsService) GetGlobalSettings added in v0.4.0

func (s *NotificationSettingsService) GetGlobalSettings(options ...RequestOptionFunc) (*NotificationSettings, *Response, error)

GetGlobalSettings returns current notification settings and email address.

GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html#global-notification-settings

func (*NotificationSettingsService) GetSettingsForGroup added in v0.4.0

func (s *NotificationSettingsService) GetSettingsForGroup(gid interface{}, options ...RequestOptionFunc) (*NotificationSettings, *Response, error)

GetSettingsForGroup returns current group notification settings.

GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html#group-project-level-notification-settings

func (*NotificationSettingsService) GetSettingsForProject added in v0.4.0

func (s *NotificationSettingsService) GetSettingsForProject(pid interface{}, options ...RequestOptionFunc) (*NotificationSettings, *Response, error)

GetSettingsForProject returns current project notification settings.

GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html#group-project-level-notification-settings

func (*NotificationSettingsService) UpdateGlobalSettings added in v0.4.0

UpdateGlobalSettings updates current notification settings and email address.

GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html#update-global-notification-settings

func (*NotificationSettingsService) UpdateSettingsForGroup added in v0.4.0

func (s *NotificationSettingsService) UpdateSettingsForGroup(gid interface{}, opt *NotificationSettingsOptions, options ...RequestOptionFunc) (*NotificationSettings, *Response, error)

UpdateSettingsForGroup updates current group notification settings.

GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html#update-group-project-level-notification-settings

func (*NotificationSettingsService) UpdateSettingsForProject added in v0.4.0

func (s *NotificationSettingsService) UpdateSettingsForProject(pid interface{}, opt *NotificationSettingsOptions, options ...RequestOptionFunc) (*NotificationSettings, *Response, error)

UpdateSettingsForProject updates current project notification settings.

GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html#update-group-project-level-notification-settings

type PagesDomain added in v0.8.0

type PagesDomain struct {
	Domain           string     `json:"domain"`
	AutoSslEnabled   bool       `json:"auto_ssl_enabled"`
	URL              string     `json:"url"`
	ProjectID        int        `json:"project_id"`
	Verified         bool       `json:"verified"`
	VerificationCode string     `json:"verification_code"`
	EnabledUntil     *time.Time `json:"enabled_until"`
	Certificate      struct {
		Expired    bool       `json:"expired"`
		Expiration *time.Time `json:"expiration"`
	} `json:"certificate"`
}

PagesDomain represents a pages domain.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html

type PagesDomainsService added in v0.8.0

type PagesDomainsService struct {
	// contains filtered or unexported fields
}

PagesDomainsService handles communication with the pages domains related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html

func (*PagesDomainsService) CreatePagesDomain added in v0.8.0

func (s *PagesDomainsService) CreatePagesDomain(pid interface{}, opt *CreatePagesDomainOptions, options ...RequestOptionFunc) (*PagesDomain, *Response, error)

CreatePagesDomain creates a new project pages domain.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html#create-new-pages-domain

func (*PagesDomainsService) DeletePagesDomain added in v0.8.0

func (s *PagesDomainsService) DeletePagesDomain(pid interface{}, domain string, options ...RequestOptionFunc) (*Response, error)

DeletePagesDomain deletes an existing prject pages domain.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html#delete-pages-domain

func (*PagesDomainsService) GetPagesDomain added in v0.8.0

func (s *PagesDomainsService) GetPagesDomain(pid interface{}, domain string, options ...RequestOptionFunc) (*PagesDomain, *Response, error)

GetPagesDomain get a specific pages domain for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html#single-pages-domain

func (*PagesDomainsService) ListAllPagesDomains added in v0.11.2

func (s *PagesDomainsService) ListAllPagesDomains(options ...RequestOptionFunc) ([]*PagesDomain, *Response, error)

ListAllPagesDomains gets a list of all pages domains.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html#list-all-pages-domains

func (*PagesDomainsService) ListPagesDomains added in v0.8.0

func (s *PagesDomainsService) ListPagesDomains(pid interface{}, opt *ListPagesDomainsOptions, options ...RequestOptionFunc) ([]*PagesDomain, *Response, error)

ListPagesDomains gets a list of project pages domains.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html#list-pages-domains

func (*PagesDomainsService) UpdatePagesDomain added in v0.8.0

func (s *PagesDomainsService) UpdatePagesDomain(pid interface{}, domain string, opt *UpdatePagesDomainOptions, options ...RequestOptionFunc) (*PagesDomain, *Response, error)

UpdatePagesDomain updates an existing project pages domain.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html#update-pages-domain

type Permissions

type Permissions struct {
	ProjectAccess *ProjectAccess `json:"project_access"`
	GroupAccess   *GroupAccess   `json:"group_access"`
}

Permissions represents permissions.

type Pipeline added in v0.4.0

type Pipeline struct {
	ID             int             `json:"id"`
	Status         string          `json:"status"`
	Ref            string          `json:"ref"`
	SHA            string          `json:"sha"`
	BeforeSHA      string          `json:"before_sha"`
	Tag            bool            `json:"tag"`
	YamlErrors     string          `json:"yaml_errors"`
	User           *BasicUser      `json:"user"`
	UpdatedAt      *time.Time      `json:"updated_at"`
	CreatedAt      *time.Time      `json:"created_at"`
	StartedAt      *time.Time      `json:"started_at"`
	FinishedAt     *time.Time      `json:"finished_at"`
	CommittedAt    *time.Time      `json:"committed_at"`
	Duration       int             `json:"duration"`
	Coverage       string          `json:"coverage"`
	WebURL         string          `json:"web_url"`
	DetailedStatus *DetailedStatus `json:"detailed_status"`
}

Pipeline represents a GitLab pipeline.

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html

func (Pipeline) String added in v0.4.0

func (p Pipeline) String() string

type PipelineEvent added in v0.3.1

type PipelineEvent struct {
	ObjectKind       string `json:"object_kind"`
	ObjectAttributes struct {
		ID         int      `json:"id"`
		Ref        string   `json:"ref"`
		Tag        bool     `json:"tag"`
		SHA        string   `json:"sha"`
		BeforeSHA  string   `json:"before_sha"`
		Status     string   `json:"status"`
		Stages     []string `json:"stages"`
		CreatedAt  string   `json:"created_at"`
		FinishedAt string   `json:"finished_at"`
		Duration   int      `json:"duration"`
	} `json:"object_attributes"`
	MergeRequest struct {
		ID                 int    `json:"id"`
		IID                int    `json:"iid"`
		Title              string `json:"title"`
		SourceBranch       string `json:"source_branch"`
		SourceProjectID    int    `json:"source_project_id"`
		TargetBranch       string `json:"target_branch"`
		TargetProjectID    int    `json:"target_project_id"`
		State              string `json:"state"`
		MergeRequestStatus string `json:"merge_status"`
		URL                string `json:"url"`
	} `json:"merge_request"`
	User struct {
		Name      string `json:"name"`
		Username  string `json:"username"`
		AvatarURL string `json:"avatar_url"`
	} `json:"user"`
	Project struct {
		ID                int             `json:"id"`
		Name              string          `json:"name"`
		Description       string          `json:"description"`
		AvatarURL         string          `json:"avatar_url"`
		GitSSHURL         string          `json:"git_ssh_url"`
		GitHTTPURL        string          `json:"git_http_url"`
		Namespace         string          `json:"namespace"`
		PathWithNamespace string          `json:"path_with_namespace"`
		DefaultBranch     string          `json:"default_branch"`
		Homepage          string          `json:"homepage"`
		URL               string          `json:"url"`
		SSHURL            string          `json:"ssh_url"`
		HTTPURL           string          `json:"http_url"`
		WebURL            string          `json:"web_url"`
		Visibility        VisibilityValue `json:"visibility"`
	} `json:"project"`
	Commit struct {
		ID        string     `json:"id"`
		Message   string     `json:"message"`
		Timestamp *time.Time `json:"timestamp"`
		URL       string     `json:"url"`
		Author    struct {
			Name  string `json:"name"`
			Email string `json:"email"`
		} `json:"author"`
	} `json:"commit"`
	Builds []struct {
		ID         int    `json:"id"`
		Stage      string `json:"stage"`
		Name       string `json:"name"`
		Status     string `json:"status"`
		CreatedAt  string `json:"created_at"`
		StartedAt  string `json:"started_at"`
		FinishedAt string `json:"finished_at"`
		When       string `json:"when"`
		Manual     bool   `json:"manual"`
		User       struct {
			Name      string `json:"name"`
			Username  string `json:"username"`
			AvatarURL string `json:"avatar_url"`
		} `json:"user"`
		Runner struct {
			ID          int    `json:"id"`
			Description string `json:"description"`
			Active      bool   `json:"active"`
			IsShared    bool   `json:"is_shared"`
		} `json:"runner"`
		ArtifactsFile struct {
			Filename string `json:"filename"`
			Size     int    `json:"size"`
		} `json:"artifacts_file"`
	} `json:"builds"`
}

PipelineEvent represents a pipeline event.

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#pipeline-events

type PipelineInfo added in v0.39.1

type PipelineInfo struct {
	ID        int        `json:"id"`
	Status    string     `json:"status"`
	Ref       string     `json:"ref"`
	SHA       string     `json:"sha"`
	WebURL    string     `json:"web_url"`
	UpdatedAt *time.Time `json:"updated_at"`
	CreatedAt *time.Time `json:"created_at"`
}

PipelineInfo shows the basic entities of a pipeline, mostly used as fields on other assets, like Commit.

func (PipelineInfo) String added in v0.39.1

func (p PipelineInfo) String() string

type PipelineSchedule added in v0.9.0

type PipelineSchedule struct {
	ID           int        `json:"id"`
	Description  string     `json:"description"`
	Ref          string     `json:"ref"`
	Cron         string     `json:"cron"`
	CronTimezone string     `json:"cron_timezone"`
	NextRunAt    *time.Time `json:"next_run_at"`
	Active       bool       `json:"active"`
	CreatedAt    *time.Time `json:"created_at"`
	UpdatedAt    *time.Time `json:"updated_at"`
	Owner        *User      `json:"owner"`
	LastPipeline struct {
		ID     int    `json:"id"`
		SHA    string `json:"sha"`
		Ref    string `json:"ref"`
		Status string `json:"status"`
	} `json:"last_pipeline"`
	Variables []*PipelineVariable `json:"variables"`
}

PipelineSchedule represents a pipeline schedule.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html

type PipelineSchedulesService added in v0.9.0

type PipelineSchedulesService struct {
	// contains filtered or unexported fields
}

PipelineSchedulesService handles communication with the pipeline schedules related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html

func (*PipelineSchedulesService) CreatePipelineSchedule added in v0.9.0

func (s *PipelineSchedulesService) CreatePipelineSchedule(pid interface{}, opt *CreatePipelineScheduleOptions, options ...RequestOptionFunc) (*PipelineSchedule, *Response, error)

CreatePipelineSchedule creates a pipeline schedule.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#create-a-new-pipeline-schedule

func (*PipelineSchedulesService) CreatePipelineScheduleVariable added in v0.9.0

func (s *PipelineSchedulesService) CreatePipelineScheduleVariable(pid interface{}, schedule int, opt *CreatePipelineScheduleVariableOptions, options ...RequestOptionFunc) (*PipelineVariable, *Response, error)

CreatePipelineScheduleVariable creates a pipeline schedule variable.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#create-a-new-pipeline-schedule

func (*PipelineSchedulesService) DeletePipelineSchedule added in v0.9.0

func (s *PipelineSchedulesService) DeletePipelineSchedule(pid interface{}, schedule int, options ...RequestOptionFunc) (*Response, error)

DeletePipelineSchedule deletes a pipeline schedule.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#delete-a-pipeline-schedule

func (*PipelineSchedulesService) DeletePipelineScheduleVariable added in v0.9.0

func (s *PipelineSchedulesService) DeletePipelineScheduleVariable(pid interface{}, schedule int, key string, options ...RequestOptionFunc) (*PipelineVariable, *Response, error)

DeletePipelineScheduleVariable creates a pipeline schedule variable.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#delete-a-pipeline-schedule-variable

func (*PipelineSchedulesService) EditPipelineSchedule added in v0.9.0

func (s *PipelineSchedulesService) EditPipelineSchedule(pid interface{}, schedule int, opt *EditPipelineScheduleOptions, options ...RequestOptionFunc) (*PipelineSchedule, *Response, error)

EditPipelineSchedule edits a pipeline schedule.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#edit-a-pipeline-schedule

func (*PipelineSchedulesService) EditPipelineScheduleVariable added in v0.9.0

func (s *PipelineSchedulesService) EditPipelineScheduleVariable(pid interface{}, schedule int, key string, opt *EditPipelineScheduleVariableOptions, options ...RequestOptionFunc) (*PipelineVariable, *Response, error)

EditPipelineScheduleVariable creates a pipeline schedule variable.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#edit-a-pipeline-schedule-variable

func (*PipelineSchedulesService) GetPipelineSchedule added in v0.9.0

func (s *PipelineSchedulesService) GetPipelineSchedule(pid interface{}, schedule int, options ...RequestOptionFunc) (*PipelineSchedule, *Response, error)

GetPipelineSchedule gets a pipeline schedule.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html

func (*PipelineSchedulesService) ListPipelineSchedules added in v0.9.0

func (s *PipelineSchedulesService) ListPipelineSchedules(pid interface{}, opt *ListPipelineSchedulesOptions, options ...RequestOptionFunc) ([]*PipelineSchedule, *Response, error)

ListPipelineSchedules gets a list of project triggers.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html

func (*PipelineSchedulesService) RunPipelineSchedule added in v0.39.1

func (s *PipelineSchedulesService) RunPipelineSchedule(pid interface{}, schedule int, options ...RequestOptionFunc) (*Response, error)

RunPipelineSchedule triggers a new scheduled pipeline to run immediately.

Gitlab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#run-a-scheduled-pipeline-immediately

func (*PipelineSchedulesService) TakeOwnershipOfPipelineSchedule added in v0.9.0

func (s *PipelineSchedulesService) TakeOwnershipOfPipelineSchedule(pid interface{}, schedule int, options ...RequestOptionFunc) (*PipelineSchedule, *Response, error)

TakeOwnershipOfPipelineSchedule sets the owner of the specified pipeline schedule to the user issuing the request.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_schedules.html#take-ownership-of-a-pipeline-schedule

type PipelineTestCases added in v0.39.1

type PipelineTestCases struct {
	Status        string  `json:"status"`
	Name          string  `json:"name"`
	Classname     string  `json:"classname"`
	ExecutionTime float64 `json:"execution_time"`
}

PipelineTestCases contains test cases details.

type PipelineTestReport added in v0.39.1

type PipelineTestReport struct {
	TotalTime    float64              `json:"total_time"`
	TotalCount   int                  `json:"total_count"`
	SuccessCount int                  `json:"success_count"`
	FailedCount  int                  `json:"failed_count"`
	SkippedCount int                  `json:"skipped_count"`
	ErrorCount   int                  `json:"error_count"`
	TestSuites   []PipelineTestSuites `json:"test_suites"`
}

PipelineTestReport contains a detailed report of a test run.

func (PipelineTestReport) String added in v0.39.1

func (p PipelineTestReport) String() string

type PipelineTestSuites added in v0.39.1

type PipelineTestSuites struct {
	Name         string              `json:"name"`
	TotalTime    float64             `json:"total_time"`
	TotalCount   int                 `json:"total_count"`
	SuccessCount int                 `json:"success_count"`
	FailedCount  int                 `json:"failed_count"`
	SkippedCount int                 `json:"skipped_count"`
	ErrorCount   int                 `json:"error_count"`
	TestCases    []PipelineTestCases `json:"test_cases"`
}

PipelineTestSuites contains test suites results.

type PipelineTrigger added in v0.6.0

type PipelineTrigger struct {
	ID          int        `json:"id"`
	Description string     `json:"description"`
	CreatedAt   *time.Time `json:"created_at"`
	DeletedAt   *time.Time `json:"deleted_at"`
	LastUsed    *time.Time `json:"last_used"`
	Token       string     `json:"token"`
	UpdatedAt   *time.Time `json:"updated_at"`
	Owner       *User      `json:"owner"`
}

PipelineTrigger represents a project pipeline trigger.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#pipeline-triggers

type PipelineTriggersService added in v0.6.0

type PipelineTriggersService struct {
	// contains filtered or unexported fields
}

PipelineTriggersService handles Project pipeline triggers.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html

func (*PipelineTriggersService) AddPipelineTrigger added in v0.6.0

func (s *PipelineTriggersService) AddPipelineTrigger(pid interface{}, opt *AddPipelineTriggerOptions, options ...RequestOptionFunc) (*PipelineTrigger, *Response, error)

AddPipelineTrigger adds a pipeline trigger to a specified project.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#create-a-project-trigger

func (*PipelineTriggersService) DeletePipelineTrigger added in v0.6.0

func (s *PipelineTriggersService) DeletePipelineTrigger(pid interface{}, trigger int, options ...RequestOptionFunc) (*Response, error)

DeletePipelineTrigger removes a trigger from a project.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#remove-a-project-trigger

func (*PipelineTriggersService) EditPipelineTrigger added in v0.6.0

func (s *PipelineTriggersService) EditPipelineTrigger(pid interface{}, trigger int, opt *EditPipelineTriggerOptions, options ...RequestOptionFunc) (*PipelineTrigger, *Response, error)

EditPipelineTrigger edits a trigger for a specified project.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#update-a-project-trigger

func (*PipelineTriggersService) GetPipelineTrigger added in v0.6.0

func (s *PipelineTriggersService) GetPipelineTrigger(pid interface{}, trigger int, options ...RequestOptionFunc) (*PipelineTrigger, *Response, error)

GetPipelineTrigger gets a specific pipeline trigger for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#get-trigger-details

func (*PipelineTriggersService) ListPipelineTriggers added in v0.6.0

func (s *PipelineTriggersService) ListPipelineTriggers(pid interface{}, opt *ListPipelineTriggersOptions, options ...RequestOptionFunc) ([]*PipelineTrigger, *Response, error)

ListPipelineTriggers gets a list of project triggers.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#list-project-triggers

func (*PipelineTriggersService) RunPipelineTrigger added in v0.7.0

func (s *PipelineTriggersService) RunPipelineTrigger(pid interface{}, opt *RunPipelineTriggerOptions, options ...RequestOptionFunc) (*Pipeline, *Response, error)

RunPipelineTrigger starts a trigger from a project.

GitLab API docs: https://docs.gitlab.com/ce/ci/triggers/README.html#triggering-a-pipeline

func (*PipelineTriggersService) TakeOwnershipOfPipelineTrigger added in v0.6.0

func (s *PipelineTriggersService) TakeOwnershipOfPipelineTrigger(pid interface{}, trigger int, options ...RequestOptionFunc) (*PipelineTrigger, *Response, error)

TakeOwnershipOfPipelineTrigger sets the owner of the specified pipeline trigger to the user issuing the request.

GitLab API docs: https://docs.gitlab.com/ce/api/pipeline_triggers.html#take-ownership-of-a-project-trigger

type PipelineVariable added in v0.9.0

type PipelineVariable struct {
	Key          string `json:"key"`
	Value        string `json:"value"`
	VariableType string `json:"variable_type"`
}

PipelineVariable represents a pipeline variable.

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html

type PipelinesEmailProperties added in v0.39.1

type PipelinesEmailProperties struct {
	Recipients                string    `json:"recipients,omitempty"`
	NotifyOnlyBrokenPipelines BoolValue `json:"notify_only_broken_pipelines,omitempty"`
	NotifyOnlyDefaultBranch   BoolValue `json:"notify_only_default_branch,omitempty"`
	BranchesToBeNotified      string    `json:"branches_to_be_notified,omitempty"`
}

PipelinesEmailProperties represents PipelinesEmail specific properties.

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#pipeline-emails

type PipelinesEmailService added in v0.39.1

type PipelinesEmailService struct {
	Service
	Properties *PipelinesEmailProperties `json:"properties"`
}

PipelinesEmailService represents Pipelines Email service settings.

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#pipeline-emails

type PipelinesService added in v0.4.0

type PipelinesService struct {
	// contains filtered or unexported fields
}

PipelinesService handles communication with the repositories related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html

func (*PipelinesService) CancelPipelineBuild added in v0.4.0

func (s *PipelinesService) CancelPipelineBuild(pid interface{}, pipeline int, options ...RequestOptionFunc) (*Pipeline, *Response, error)

CancelPipelineBuild cancels a pipeline builds

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#cancel-a-pipelines-builds

func (*PipelinesService) CreatePipeline added in v0.4.0

func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOptions, options ...RequestOptionFunc) (*Pipeline, *Response, error)

CreatePipeline creates a new project pipeline.

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#create-a-new-pipeline

func (*PipelinesService) DeletePipeline added in v0.39.1

func (s *PipelinesService) DeletePipeline(pid interface{}, pipeline int, options ...RequestOptionFunc) (*Response, error)

DeletePipeline deletes an existing pipeline.

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#delete-a-pipeline

func (*PipelinesService) GetPipeline added in v0.4.0

func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int, options ...RequestOptionFunc) (*Pipeline, *Response, error)

GetPipeline gets a single project pipeline.

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#get-a-single-pipeline

func (*PipelinesService) GetPipelineTestReport added in v0.39.1

func (s *PipelinesService) GetPipelineTestReport(pid interface{}, pipeline int) (*PipelineTestReport, *Response, error)

GetPipelineTestReport gets the test report of a single project pipeline.

GitLab API docs: https://docs.gitlab.com/ee/api/pipelines.html#get-a-pipelines-test-report

func (*PipelinesService) GetPipelineVariables added in v0.39.1

func (s *PipelinesService) GetPipelineVariables(pid interface{}, pipeline int, options ...RequestOptionFunc) ([]*PipelineVariable, *Response, error)

GetPipelineVariables gets the variables of a single project pipeline.

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#get-variables-of-a-pipeline

func (*PipelinesService) ListProjectPipelines added in v0.4.0

func (s *PipelinesService) ListProjectPipelines(pid interface{}, opt *ListProjectPipelinesOptions, options ...RequestOptionFunc) ([]*PipelineInfo, *Response, error)

ListProjectPipelines gets a list of project piplines.

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#list-project-pipelines

func (*PipelinesService) RetryPipelineBuild added in v0.4.0

func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipeline int, options ...RequestOptionFunc) (*Pipeline, *Response, error)

RetryPipelineBuild retries failed builds in a pipeline

GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#retry-failed-builds-in-a-pipeline

type PlatformKubernetes added in v0.39.1

type PlatformKubernetes struct {
	APIURL            string `json:"api_url"`
	Token             string `json:"token"`
	CaCert            string `json:"ca_cert"`
	Namespace         string `json:"namespace"`
	AuthorizationType string `json:"authorization_type"`
}

PlatformKubernetes represents a GitLab Project Cluster PlatformKubernetes.

type PostCommitCommentOptions

type PostCommitCommentOptions struct {
	Note     *string `url:"note,omitempty" json:"note,omitempty"`
	Path     *string `url:"path" json:"path"`
	Line     *int    `url:"line" json:"line"`
	LineType *string `url:"line_type" json:"line_type"`
}

PostCommitCommentOptions represents the available PostCommitComment() options.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#post-comment-to-commit

type ProcessMetrics added in v0.8.1

type ProcessMetrics struct {
	Processes []struct {
		Hostname    string     `json:"hostname"`
		Pid         int        `json:"pid"`
		Tag         string     `json:"tag"`
		StartedAt   *time.Time `json:"started_at"`
		Queues      []string   `json:"queues"`
		Labels      []string   `json:"labels"`
		Concurrency int        `json:"concurrency"`
		Busy        int        `json:"busy"`
	} `json:"processes"`
}

ProcessMetrics represents the GitLab sidekiq process metrics.

GitLab API docs: https://docs.gitlab.com/ce/api/sidekiq_metrics.html#get-the-current-process-metrics

type Project

type Project struct {
	ID                                        int                `json:"id"`
	Description                               string             `json:"description"`
	DefaultBranch                             string             `json:"default_branch"`
	Public                                    bool               `json:"public"`
	Visibility                                VisibilityValue    `json:"visibility"`
	SSHURLToRepo                              string             `json:"ssh_url_to_repo"`
	HTTPURLToRepo                             string             `json:"http_url_to_repo"`
	WebURL                                    string             `json:"web_url"`
	ReadmeURL                                 string             `json:"readme_url"`
	TagList                                   []string           `json:"tag_list"`
	Owner                                     *User              `json:"owner"`
	Name                                      string             `json:"name"`
	NameWithNamespace                         string             `json:"name_with_namespace"`
	Path                                      string             `json:"path"`
	PathWithNamespace                         string             `json:"path_with_namespace"`
	IssuesEnabled                             bool               `json:"issues_enabled"`
	OpenIssuesCount                           int                `json:"open_issues_count"`
	MergeRequestsEnabled                      bool               `json:"merge_requests_enabled"`
	ApprovalsBeforeMerge                      int                `json:"approvals_before_merge"`
	JobsEnabled                               bool               `json:"jobs_enabled"`
	WikiEnabled                               bool               `json:"wiki_enabled"`
	SnippetsEnabled                           bool               `json:"snippets_enabled"`
	ResolveOutdatedDiffDiscussions            bool               `json:"resolve_outdated_diff_discussions"`
	ContainerRegistryEnabled                  bool               `json:"container_registry_enabled"`
	CreatedAt                                 *time.Time         `json:"created_at,omitempty"`
	LastActivityAt                            *time.Time         `json:"last_activity_at,omitempty"`
	CreatorID                                 int                `json:"creator_id"`
	Namespace                                 *ProjectNamespace  `json:"namespace"`
	ImportStatus                              string             `json:"import_status"`
	ImportError                               string             `json:"import_error"`
	Permissions                               *Permissions       `json:"permissions"`
	MarkedForDeletionAt                       *ISOTime           `json:"marked_for_deletion_at"`
	Archived                                  bool               `json:"archived"`
	AvatarURL                                 string             `json:"avatar_url"`
	SharedRunnersEnabled                      bool               `json:"shared_runners_enabled"`
	ForksCount                                int                `json:"forks_count"`
	StarCount                                 int                `json:"star_count"`
	RunnersToken                              string             `json:"runners_token"`
	PublicBuilds                              bool               `json:"public_builds"`
	OnlyAllowMergeIfPipelineSucceeds          bool               `json:"only_allow_merge_if_pipeline_succeeds"`
	OnlyAllowMergeIfAllDiscussionsAreResolved bool               `json:"only_allow_merge_if_all_discussions_are_resolved"`
	RemoveSourceBranchAfterMerge              bool               `json:"remove_source_branch_after_merge"`
	LFSEnabled                                bool               `json:"lfs_enabled"`
	RequestAccessEnabled                      bool               `json:"request_access_enabled"`
	MergeMethod                               MergeMethodValue   `json:"merge_method"`
	ForkedFromProject                         *ForkParent        `json:"forked_from_project"`
	Mirror                                    bool               `json:"mirror"`
	MirrorUserID                              int                `json:"mirror_user_id"`
	MirrorTriggerBuilds                       bool               `json:"mirror_trigger_builds"`
	OnlyMirrorProtectedBranches               bool               `json:"only_mirror_protected_branches"`
	MirrorOverwritesDivergedBranches          bool               `json:"mirror_overwrites_diverged_branches"`
	PackagesEnabled                           bool               `json:"packages_enabled"`
	ServiceDeskEnabled                        bool               `json:"service_desk_enabled"`
	ServiceDeskAddress                        string             `json:"service_desk_address"`
	IssuesAccessLevel                         AccessControlValue `json:"issues_access_level"`
	RepositoryAccessLevel                     AccessControlValue `json:"repository_access_level"`
	MergeRequestsAccessLevel                  AccessControlValue `json:"merge_requests_access_level"`
	ForkingAccessLevel                        AccessControlValue `json:"forking_access_level"`
	WikiAccessLevel                           AccessControlValue `json:"wiki_access_level"`
	BuildsAccessLevel                         AccessControlValue `json:"builds_access_level"`
	SnippetsAccessLevel                       AccessControlValue `json:"snippets_access_level"`
	PagesAccessLevel                          AccessControlValue `json:"pages_access_level"`
	AutocloseReferencedIssues                 bool               `json:"autoclose_referenced_issues"`
	SharedWithGroups                          []struct {
		GroupID          int    `json:"group_id"`
		GroupName        string `json:"group_name"`
		GroupAccessLevel int    `json:"group_access_level"`
	} `json:"shared_with_groups"`
	Statistics           *ProjectStatistics `json:"statistics"`
	Links                *Links             `json:"_links,omitempty"`
	CIConfigPath         string             `json:"ci_config_path"`
	CIDefaultGitDepth    int                `json:"ci_default_git_depth"`
	CustomAttributes     []*CustomAttribute `json:"custom_attributes"`
	ComplianceFrameworks []string           `json:"compliance_frameworks"`
}

Project represents a GitLab project.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html

func (Project) String

func (s Project) String() string

type ProjectAccess

type ProjectAccess struct {
	AccessLevel       AccessLevelValue       `json:"access_level"`
	NotificationLevel NotificationLevelValue `json:"notification_level"`
}

ProjectAccess represents project access.

type ProjectApprovalRule added in v0.39.1

type ProjectApprovalRule struct {
	ID                   int                `json:"id"`
	Name                 string             `json:"name"`
	RuleType             string             `json:"rule_type"`
	EligibleApprovers    []*BasicUser       `json:"eligible_approvers"`
	ApprovalsRequired    int                `json:"approvals_required"`
	Users                []*BasicUser       `json:"users"`
	Groups               []*Group           `json:"groups"`
	ContainsHiddenGroups bool               `json:"contains_hidden_groups"`
	ProtectedBranches    []*ProtectedBranch `json:"protected_branches"`
}

ProjectApprovalRule represents a GitLab project approval rule.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-project-level-rules

func (ProjectApprovalRule) String added in v0.39.1

func (s ProjectApprovalRule) String() string

type ProjectApprovals added in v0.39.1

type ProjectApprovals struct {
	Approvers                                 []*MergeRequestApproverUser  `json:"approvers"`
	ApproverGroups                            []*MergeRequestApproverGroup `json:"approver_groups"`
	ApprovalsBeforeMerge                      int                          `json:"approvals_before_merge"`
	ResetApprovalsOnPush                      bool                         `json:"reset_approvals_on_push"`
	DisableOverridingApproversPerMergeRequest bool                         `json:"disable_overriding_approvers_per_merge_request"`
	MergeRequestsAuthorApproval               bool                         `json:"merge_requests_author_approval"`
	MergeRequestsDisableCommittersApproval    bool                         `json:"merge_requests_disable_committers_approval"`
}

ProjectApprovals represents GitLab project level merge request approvals.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#project-level-mr-approvals

type ProjectBadge added in v0.11.1

type ProjectBadge struct {
	ID               int    `json:"id"`
	LinkURL          string `json:"link_url"`
	ImageURL         string `json:"image_url"`
	RenderedLinkURL  string `json:"rendered_link_url"`
	RenderedImageURL string `json:"rendered_image_url"`
	// Kind represents a project badge kind. Can be empty, when used PreviewProjectBadge().
	Kind string `json:"kind"`
}

ProjectBadge represents a project badge.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#list-all-badges-of-a-project

type ProjectBadgePreviewOptions added in v0.11.1

type ProjectBadgePreviewOptions struct {
	LinkURL  *string `url:"link_url,omitempty" json:"link_url,omitempty"`
	ImageURL *string `url:"image_url,omitempty" json:"image_url,omitempty"`
}

ProjectBadgePreviewOptions represents the available PreviewProjectBadge() options.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#preview-a-badge-from-a-project

type ProjectBadgesService added in v0.11.1

type ProjectBadgesService struct {
	// contains filtered or unexported fields
}

ProjectBadgesService handles communication with the project badges related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html

func (*ProjectBadgesService) AddProjectBadge added in v0.11.1

func (s *ProjectBadgesService) AddProjectBadge(pid interface{}, opt *AddProjectBadgeOptions, options ...RequestOptionFunc) (*ProjectBadge, *Response, error)

AddProjectBadge adds a badge to a project.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#add-a-badge-to-a-project

func (*ProjectBadgesService) DeleteProjectBadge added in v0.11.1

func (s *ProjectBadgesService) DeleteProjectBadge(pid interface{}, badge int, options ...RequestOptionFunc) (*Response, error)

DeleteProjectBadge removes a badge from a project. Only project's badges will be removed by using this endpoint.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#remove-a-badge-from-a-project

func (*ProjectBadgesService) EditProjectBadge added in v0.11.1

func (s *ProjectBadgesService) EditProjectBadge(pid interface{}, badge int, opt *EditProjectBadgeOptions, options ...RequestOptionFunc) (*ProjectBadge, *Response, error)

EditProjectBadge updates a badge of a project.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#edit-a-badge-of-a-project

func (*ProjectBadgesService) GetProjectBadge added in v0.11.1

func (s *ProjectBadgesService) GetProjectBadge(pid interface{}, badge int, options ...RequestOptionFunc) (*ProjectBadge, *Response, error)

GetProjectBadge gets a project badge.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#get-a-badge-of-a-project

func (*ProjectBadgesService) ListProjectBadges added in v0.11.1

func (s *ProjectBadgesService) ListProjectBadges(pid interface{}, opt *ListProjectBadgesOptions, options ...RequestOptionFunc) ([]*ProjectBadge, *Response, error)

ListProjectBadges gets a list of a project's badges and its group badges.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#list-all-badges-of-a-project

func (*ProjectBadgesService) PreviewProjectBadge added in v0.11.1

func (s *ProjectBadgesService) PreviewProjectBadge(pid interface{}, opt *ProjectBadgePreviewOptions, options ...RequestOptionFunc) (*ProjectBadge, *Response, error)

PreviewProjectBadge returns how the link_url and image_url final URLs would be after resolving the placeholder interpolation.

GitLab API docs: https://docs.gitlab.com/ee/api/project_badges.html#preview-a-badge-from-a-project

type ProjectCluster added in v0.39.1

type ProjectCluster struct {
	ID                 int                 `json:"id"`
	Name               string              `json:"name"`
	Domain             string              `json:"domain"`
	CreatedAt          *time.Time          `json:"created_at"`
	ProviderType       string              `json:"provider_type"`
	PlatformType       string              `json:"platform_type"`
	EnvironmentScope   string              `json:"environment_scope"`
	ClusterType        string              `json:"cluster_type"`
	User               *User               `json:"user"`
	PlatformKubernetes *PlatformKubernetes `json:"platform_kubernetes"`
	ManagementProject  *ManagementProject  `json:"management_project"`
	Project            *Project            `json:"project"`
}

ProjectCluster represents a GitLab Project Cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/project_clusters.html

func (ProjectCluster) String added in v0.39.1

func (v ProjectCluster) String() string

type ProjectClustersService added in v0.39.1

type ProjectClustersService struct {
	// contains filtered or unexported fields
}

ProjectClustersService handles communication with the project clusters related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/project_clusters.html

func (*ProjectClustersService) AddCluster added in v0.39.1

func (s *ProjectClustersService) AddCluster(pid interface{}, opt *AddClusterOptions, options ...RequestOptionFunc) (*ProjectCluster, *Response, error)

AddCluster adds an existing cluster to the project.

GitLab API docs: https://docs.gitlab.com/ee/api/project_clusters.html#add-existing-cluster-to-project

func (*ProjectClustersService) DeleteCluster added in v0.39.1

func (s *ProjectClustersService) DeleteCluster(pid interface{}, cluster int, options ...RequestOptionFunc) (*Response, error)

DeleteCluster deletes an existing project cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/project_clusters.html#delete-project-cluster

func (*ProjectClustersService) EditCluster added in v0.39.1

func (s *ProjectClustersService) EditCluster(pid interface{}, cluster int, opt *EditClusterOptions, options ...RequestOptionFunc) (*ProjectCluster, *Response, error)

EditCluster updates an existing project cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/project_clusters.html#edit-project-cluster

func (*ProjectClustersService) GetCluster added in v0.39.1

func (s *ProjectClustersService) GetCluster(pid interface{}, cluster int, options ...RequestOptionFunc) (*ProjectCluster, *Response, error)

GetCluster gets a cluster.

GitLab API docs: https://docs.gitlab.com/ee/api/project_clusters.html#get-a-single-project-cluster

func (*ProjectClustersService) ListClusters added in v0.39.1

func (s *ProjectClustersService) ListClusters(pid interface{}, options ...RequestOptionFunc) ([]*ProjectCluster, *Response, error)

ListClusters gets a list of all clusters in a project.

GitLab API docs: https://docs.gitlab.com/ee/api/project_clusters.html#list-project-clusters

type ProjectCreationLevelValue added in v0.39.1

type ProjectCreationLevelValue string

ProjectCreationLevelValue represents a project creation level within GitLab.

GitLab API docs: https://docs.gitlab.com/ce/api/

const (
	NoOneProjectCreation      ProjectCreationLevelValue = "noone"
	MaintainerProjectCreation ProjectCreationLevelValue = "maintainer"
	DeveloperProjectCreation  ProjectCreationLevelValue = "developer"
)

List of available project creation levels.

GitLab API docs: https://docs.gitlab.com/ce/api/

func ProjectCreationLevel added in v0.39.1

ProjectCreationLevel is a helper routine that allocates a new ProjectCreationLevelValue to store v and returns a pointer to it.

type ProjectEvent

type ProjectEvent struct {
	Title          interface{} `json:"title"`
	ProjectID      int         `json:"project_id"`
	ActionName     string      `json:"action_name"`
	TargetID       interface{} `json:"target_id"`
	TargetType     interface{} `json:"target_type"`
	AuthorID       int         `json:"author_id"`
	AuthorUsername string      `json:"author_username"`
	Data           struct {
		Before            string      `json:"before"`
		After             string      `json:"after"`
		Ref               string      `json:"ref"`
		UserID            int         `json:"user_id"`
		UserName          string      `json:"user_name"`
		Repository        *Repository `json:"repository"`
		Commits           []*Commit   `json:"commits"`
		TotalCommitsCount int         `json:"total_commits_count"`
	} `json:"data"`
	TargetTitle interface{} `json:"target_title"`
}

ProjectEvent represents a GitLab project event.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#get-project-events

func (ProjectEvent) String

func (s ProjectEvent) String() string

type ProjectFile added in v0.6.2

type ProjectFile struct {
	Alt      string `json:"alt"`
	URL      string `json:"url"`
	Markdown string `json:"markdown"`
}

ProjectFile represents an uploaded project file

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#upload-a-file

type ProjectForkRelation

type ProjectForkRelation struct {
	ID                  int        `json:"id"`
	ForkedToProjectID   int        `json:"forked_to_project_id"`
	ForkedFromProjectID int        `json:"forked_from_project_id"`
	CreatedAt           *time.Time `json:"created_at"`
	UpdatedAt           *time.Time `json:"updated_at"`
}

ProjectForkRelation represents a project fork relationship.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#admin-fork-relation

type ProjectHook

type ProjectHook struct {
	ID                       int        `json:"id"`
	URL                      string     `json:"url"`
	ConfidentialNoteEvents   bool       `json:"confidential_note_events"`
	ProjectID                int        `json:"project_id"`
	PushEvents               bool       `json:"push_events"`
	PushEventsBranchFilter   string     `json:"push_events_branch_filter"`
	IssuesEvents             bool       `json:"issues_events"`
	ConfidentialIssuesEvents bool       `json:"confidential_issues_events"`
	MergeRequestsEvents      bool       `json:"merge_requests_events"`
	TagPushEvents            bool       `json:"tag_push_events"`
	NoteEvents               bool       `json:"note_events"`
	JobEvents                bool       `json:"job_events"`
	PipelineEvents           bool       `json:"pipeline_events"`
	WikiPageEvents           bool       `json:"wiki_page_events"`
	EnableSSLVerification    bool       `json:"enable_ssl_verification"`
	CreatedAt                *time.Time `json:"created_at"`
}

ProjectHook represents a project hook.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-project-hooks

type ProjectImportExportService added in v0.39.1

type ProjectImportExportService struct {
	// contains filtered or unexported fields
}

ProjectImportExportService handles communication with the project import/export related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/user/project/settings/import_export.html

func (*ProjectImportExportService) ExportDownload added in v0.39.1

func (s *ProjectImportExportService) ExportDownload(pid interface{}, options ...RequestOptionFunc) ([]byte, *Response, error)

ExportDownload download the finished export.

GitLab API docs: https://docs.gitlab.com/ce/api/project_import_export.html#export-download

func (*ProjectImportExportService) ExportStatus added in v0.39.1

func (s *ProjectImportExportService) ExportStatus(pid interface{}, options ...RequestOptionFunc) (*ExportStatus, *Response, error)

ExportStatus get the status of export.

GitLab API docs: https://docs.gitlab.com/ce/api/project_import_export.html#export-status

func (*ProjectImportExportService) ImportFile added in v0.39.1

ImportFile import a file.

GitLab API docs: https://docs.gitlab.com/ce/api/project_import_export.html#import-a-file

func (*ProjectImportExportService) ImportStatus added in v0.39.1

func (s *ProjectImportExportService) ImportStatus(pid interface{}, options ...RequestOptionFunc) (*ImportStatus, *Response, error)

ImportStatus get the status of an import.

GitLab API docs: https://docs.gitlab.com/ce/api/project_import_export.html#import-status

func (*ProjectImportExportService) ScheduleExport added in v0.39.1

func (s *ProjectImportExportService) ScheduleExport(pid interface{}, opt *ScheduleExportOptions, options ...RequestOptionFunc) (*Response, error)

ScheduleExport schedules a project export.

GitLab API docs: https://docs.gitlab.com/ce/api/project_import_export.html#schedule-an-export

type ProjectLanguages added in v0.11.1

type ProjectLanguages map[string]float32

ProjectLanguages is a map of strings because the response is arbitrary

Gitlab API docs: https://docs.gitlab.com/ce/api/projects.html#languages

type ProjectMember

type ProjectMember struct {
	ID          int              `json:"id"`
	Username    string           `json:"username"`
	Email       string           `json:"email"`
	Name        string           `json:"name"`
	State       string           `json:"state"`
	CreatedAt   *time.Time       `json:"created_at"`
	ExpiresAt   *ISOTime         `json:"expires_at"`
	AccessLevel AccessLevelValue `json:"access_level"`
	WebURL      string           `json:"web_url"`
	AvatarURL   string           `json:"avatar_url"`
}

ProjectMember represents a project member.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-project-team-members

type ProjectMembersService added in v0.6.0

type ProjectMembersService struct {
	// contains filtered or unexported fields
}

ProjectMembersService handles communication with the project members related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html

func (*ProjectMembersService) AddProjectMember added in v0.6.0

func (s *ProjectMembersService) AddProjectMember(pid interface{}, opt *AddProjectMemberOptions, options ...RequestOptionFunc) (*ProjectMember, *Response, error)

AddProjectMember adds a user to a project team. This is an idempotent method and can be called multiple times with the same parameters. Adding team membership to a user that is already a member does not affect the existing membership.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#add-a-member-to-a-group-or-project

func (*ProjectMembersService) DeleteProjectMember added in v0.6.0

func (s *ProjectMembersService) DeleteProjectMember(pid interface{}, user int, options ...RequestOptionFunc) (*Response, error)

DeleteProjectMember removes a user from a project team.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#remove-a-member-from-a-group-or-project

func (*ProjectMembersService) EditProjectMember added in v0.6.0

func (s *ProjectMembersService) EditProjectMember(pid interface{}, user int, opt *EditProjectMemberOptions, options ...RequestOptionFunc) (*ProjectMember, *Response, error)

EditProjectMember updates a project team member to a specified access level..

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#edit-a-member-of-a-group-or-project

func (*ProjectMembersService) GetInheritedProjectMember added in v0.39.1

func (s *ProjectMembersService) GetInheritedProjectMember(pid interface{}, user int, options ...RequestOptionFunc) (*ProjectMember, *Response, error)

GetInheritedProjectMember gets a project team member, including inherited

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#get-a-member-of-a-group-or-project-including-inherited-members

func (*ProjectMembersService) GetProjectMember added in v0.6.0

func (s *ProjectMembersService) GetProjectMember(pid interface{}, user int, options ...RequestOptionFunc) (*ProjectMember, *Response, error)

GetProjectMember gets a project team member.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#get-a-member-of-a-group-or-project

func (*ProjectMembersService) ListAllProjectMembers added in v0.11.2

func (s *ProjectMembersService) ListAllProjectMembers(pid interface{}, opt *ListProjectMembersOptions, options ...RequestOptionFunc) ([]*ProjectMember, *Response, error)

ListAllProjectMembers gets a list of a project's team members viewable by the authenticated user. Returns a list including inherited members through ancestor groups.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project-including-inherited-members

func (*ProjectMembersService) ListProjectMembers added in v0.6.0

func (s *ProjectMembersService) ListProjectMembers(pid interface{}, opt *ListProjectMembersOptions, options ...RequestOptionFunc) ([]*ProjectMember, *Response, error)

ListProjectMembers gets a list of a project's team members viewable by the authenticated user. Returns only direct members and not inherited members through ancestors groups.

GitLab API docs: https://docs.gitlab.com/ce/api/members.html#list-all-members-of-a-group-or-project

type ProjectMirror added in v0.39.1

type ProjectMirror struct {
	Enabled                bool       `json:"enabled"`
	ID                     int        `json:"id"`
	LastError              string     `json:"last_error"`
	LastSuccessfulUpdateAt *time.Time `json:"last_successful_update_at"`
	LastUpdateAt           *time.Time `json:"last_update_at"`
	LastUpdateStartedAt    *time.Time `json:"last_update_started_at"`
	OnlyProtectedBranches  bool       `json:"only_protected_branches"`
	KeepDivergentRefs      bool       `json:"keep_divergent_refs"`
	UpdateStatus           string     `json:"update_status"`
	URL                    string     `json:"url"`
}

ProjectMirror represents a project mirror configuration.

GitLAb API docs: https://docs.gitlab.com/ce/api/remote_mirrors.html

type ProjectMirrorService added in v0.39.1

type ProjectMirrorService struct {
	// contains filtered or unexported fields
}

ProjectMirrorService handles communication with the project mirror related methods of the GitLab API.

GitLAb API docs: https://docs.gitlab.com/ce/api/remote_mirrors.html

func (*ProjectMirrorService) AddProjectMirror added in v0.39.1

func (s *ProjectMirrorService) AddProjectMirror(pid interface{}, opt *AddProjectMirrorOptions, options ...RequestOptionFunc) (*ProjectMirror, *Response, error)

AddProjectMirror creates a new mirror on the project.

GitLab API docs: https://docs.gitlab.com/ce/api/remote_mirrors.html#create-a-remote-mirror

func (*ProjectMirrorService) EditProjectMirror added in v0.39.1

func (s *ProjectMirrorService) EditProjectMirror(pid interface{}, mirror int, opt *EditProjectMirrorOptions, options ...RequestOptionFunc) (*ProjectMirror, *Response, error)

EditProjectMirror updates a project team member to a specified access level..

GitLab API docs: https://docs.gitlab.com/ce/api/remote_mirrors.html#update-a-remote-mirrors-attributes

func (*ProjectMirrorService) ListProjectMirror added in v0.39.1

func (s *ProjectMirrorService) ListProjectMirror(pid interface{}, options ...RequestOptionFunc) ([]*ProjectMirror, *Response, error)

ListProjectMirror gets a list of mirrors configured on the project.

GitLab API docs: https://docs.gitlab.com/ce/api/remote_mirrors.html#list-a-projects-remote-mirrors

type ProjectNamespace

type ProjectNamespace struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Path      string `json:"path"`
	Kind      string `json:"kind"`
	FullPath  string `json:"full_path"`
	AvatarURL string `json:"avatar_url"`
	WebURL    string `json:"web_url"`
}

ProjectNamespace represents a project namespace.

type ProjectPushRules added in v0.39.1

type ProjectPushRules struct {
	ID                         int        `json:"id"`
	ProjectID                  int        `json:"project_id"`
	CommitMessageRegex         string     `json:"commit_message_regex"`
	CommitMessageNegativeRegex string     `json:"commit_message_negative_regex"`
	BranchNameRegex            string     `json:"branch_name_regex"`
	DenyDeleteTag              bool       `json:"deny_delete_tag"`
	CreatedAt                  *time.Time `json:"created_at"`
	MemberCheck                bool       `json:"member_check"`
	PreventSecrets             bool       `json:"prevent_secrets"`
	AuthorEmailRegex           string     `json:"author_email_regex"`
	FileNameRegex              string     `json:"file_name_regex"`
	MaxFileSize                int        `json:"max_file_size"`
	CommitCommitterCheck       bool       `json:"commit_committer_check"`
	RejectUnsignedCommits      bool       `json:"reject_unsigned_commits"`
}

ProjectPushRules represents a project push rule.

GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#push-rules

type ProjectSnippetsService

type ProjectSnippetsService struct {
	// contains filtered or unexported fields
}

ProjectSnippetsService handles communication with the project snippets related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html

func (*ProjectSnippetsService) CreateSnippet

func (s *ProjectSnippetsService) CreateSnippet(pid interface{}, opt *CreateProjectSnippetOptions, options ...RequestOptionFunc) (*Snippet, *Response, error)

CreateSnippet creates a new project snippet. The user must have permission to create new snippets.

GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#create-new-snippet

func (*ProjectSnippetsService) DeleteSnippet

func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int, options ...RequestOptionFunc) (*Response, error)

DeleteSnippet deletes an existing project snippet. This is an idempotent function and deleting a non-existent snippet still returns a 200 OK status code.

GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#delete-snippet

func (*ProjectSnippetsService) GetSnippet

func (s *ProjectSnippetsService) GetSnippet(pid interface{}, snippet int, options ...RequestOptionFunc) (*Snippet, *Response, error)

GetSnippet gets a single project snippet

GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#single-snippet

func (*ProjectSnippetsService) ListSnippets

func (s *ProjectSnippetsService) ListSnippets(pid interface{}, opt *ListProjectSnippetsOptions, options ...RequestOptionFunc) ([]*Snippet, *Response, error)

ListSnippets gets a list of project snippets.

GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#list-snippets

func (*ProjectSnippetsService) SnippetContent

func (s *ProjectSnippetsService) SnippetContent(pid interface{}, snippet int, options ...RequestOptionFunc) ([]byte, *Response, error)

SnippetContent returns the raw project snippet as plain text.

GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#snippet-content

func (*ProjectSnippetsService) UpdateSnippet

func (s *ProjectSnippetsService) UpdateSnippet(pid interface{}, snippet int, opt *UpdateProjectSnippetOptions, options ...RequestOptionFunc) (*Snippet, *Response, error)

UpdateSnippet updates an existing project snippet. The user must have permission to change an existing snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#update-snippet

type ProjectStatistics added in v0.4.1

type ProjectStatistics struct {
	StorageStatistics
	CommitCount int `json:"commit_count"`
}

ProjectStatistics represents a statistics record for a project.

type ProjectSystemEvent added in v0.39.1

type ProjectSystemEvent struct {
	BaseSystemEvent
	Name                 string `json:"name"`
	Path                 string `json:"path"`
	PathWithNamespace    string `json:"path_with_namespace"`
	ProjectID            int    `json:"project_id"`
	OwnerName            string `json:"owner_name"`
	OwnerEmail           string `json:"owner_email"`
	ProjectVisibility    string `json:"project_visibility"`
	OldPathWithNamespace string `json:"old_path_with_namespace,omitempty"`
}

ProjectSystemEvent represents a project system event.

GitLab API docs: https://docs.gitlab.com/ee/system_hooks/system_hooks.html

type ProjectUser added in v0.8.0

type ProjectUser struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	Username  string `json:"username"`
	State     string `json:"state"`
	AvatarURL string `json:"avatar_url"`
	WebURL    string `json:"web_url"`
}

ProjectUser represents a GitLab project user.

type ProjectVariable added in v0.11.0

type ProjectVariable struct {
	Key              string            `json:"key"`
	Value            string            `json:"value"`
	VariableType     VariableTypeValue `json:"variable_type"`
	Protected        bool              `json:"protected"`
	Masked           bool              `json:"masked"`
	EnvironmentScope string            `json:"environment_scope"`
}

ProjectVariable represents a GitLab Project Variable.

GitLab API docs: https://docs.gitlab.com/ee/api/project_level_variables.html

func (ProjectVariable) String added in v0.11.0

func (v ProjectVariable) String() string

type ProjectVariablesService added in v0.11.0

type ProjectVariablesService struct {
	// contains filtered or unexported fields
}

ProjectVariablesService handles communication with the project variables related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/project_level_variables.html

func (*ProjectVariablesService) CreateVariable added in v0.11.0

func (s *ProjectVariablesService) CreateVariable(pid interface{}, opt *CreateProjectVariableOptions, options ...RequestOptionFunc) (*ProjectVariable, *Response, error)

CreateVariable creates a new project variable.

GitLab API docs: https://docs.gitlab.com/ee/api/project_level_variables.html#create-variable

func (*ProjectVariablesService) GetVariable added in v0.11.0

func (s *ProjectVariablesService) GetVariable(pid interface{}, key string, options ...RequestOptionFunc) (*ProjectVariable, *Response, error)

GetVariable gets a variable.

GitLab API docs: https://docs.gitlab.com/ee/api/project_level_variables.html#show-variable-details

func (*ProjectVariablesService) ListVariables added in v0.11.0

func (s *ProjectVariablesService) ListVariables(pid interface{}, opt *ListProjectVariablesOptions, options ...RequestOptionFunc) ([]*ProjectVariable, *Response, error)

ListVariables gets a list of all variables in a project.

GitLab API docs: https://docs.gitlab.com/ee/api/project_level_variables.html#list-project-variables

func (*ProjectVariablesService) RemoveVariable added in v0.11.0

func (s *ProjectVariablesService) RemoveVariable(pid interface{}, key string, options ...RequestOptionFunc) (*Response, error)

RemoveVariable removes a project's variable.

GitLab API docs: https://docs.gitlab.com/ee/api/project_level_variables.html#remove-variable

func (*ProjectVariablesService) UpdateVariable added in v0.11.0

func (s *ProjectVariablesService) UpdateVariable(pid interface{}, key string, opt *UpdateProjectVariableOptions, options ...RequestOptionFunc) (*ProjectVariable, *Response, error)

UpdateVariable updates a project's variable.

GitLab API docs: https://docs.gitlab.com/ee/api/project_level_variables.html#update-variable

type ProjectsService

type ProjectsService struct {
	// contains filtered or unexported fields
}

ProjectsService handles communication with the repositories related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html

func (*ProjectsService) AddProjectHook

func (s *ProjectsService) AddProjectHook(pid interface{}, opt *AddProjectHookOptions, options ...RequestOptionFunc) (*ProjectHook, *Response, error)

AddProjectHook adds a hook to a specified project.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#add-project-hook

func (*ProjectsService) AddProjectPushRule added in v0.39.1

func (s *ProjectsService) AddProjectPushRule(pid interface{}, opt *AddProjectPushRuleOptions, options ...RequestOptionFunc) (*ProjectPushRules, *Response, error)

AddProjectPushRule adds a push rule to a specified project.

GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#add-project-push-rule

func (*ProjectsService) ArchiveProject

func (s *ProjectsService) ArchiveProject(pid interface{}, options ...RequestOptionFunc) (*Project, *Response, error)

ArchiveProject archives the project if the user is either admin or the project owner of this project.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#archive-a-project

func (*ProjectsService) ChangeAllowedApprovers added in v0.39.1

func (s *ProjectsService) ChangeAllowedApprovers(pid interface{}, opt *ChangeAllowedApproversOptions, options ...RequestOptionFunc) (*ProjectApprovals, *Response, error)

ChangeAllowedApprovers updates the list of approvers and approver groups.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#change-allowed-approvers

func (*ProjectsService) ChangeApprovalConfiguration added in v0.39.1

func (s *ProjectsService) ChangeApprovalConfiguration(pid interface{}, opt *ChangeApprovalConfigurationOptions, options ...RequestOptionFunc) (*ProjectApprovals, *Response, error)

ChangeApprovalConfiguration updates the approval configuration for a project.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#change-configuration

func (*ProjectsService) CreateProject

func (s *ProjectsService) CreateProject(opt *CreateProjectOptions, options ...RequestOptionFunc) (*Project, *Response, error)

CreateProject creates a new project owned by the authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#create-project

func (*ProjectsService) CreateProjectApprovalRule added in v0.39.1

func (s *ProjectsService) CreateProjectApprovalRule(pid interface{}, opt *CreateProjectLevelRuleOptions, options ...RequestOptionFunc) (*ProjectApprovalRule, *Response, error)

CreateProjectApprovalRule creates a new project-level approval rule.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#create-project-level-rules

func (*ProjectsService) CreateProjectForUser

func (s *ProjectsService) CreateProjectForUser(user int, opt *CreateProjectForUserOptions, options ...RequestOptionFunc) (*Project, *Response, error)

CreateProjectForUser creates a new project owned by the specified user. Available only for admins.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#create-project-for-user

func (*ProjectsService) CreateProjectForkRelation

func (s *ProjectsService) CreateProjectForkRelation(pid int, fork int, options ...RequestOptionFunc) (*ProjectForkRelation, *Response, error)

CreateProjectForkRelation creates a forked from/to relation between existing projects.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#create-a-forked-fromto-relation-between-existing-projects.

func (*ProjectsService) DeleteProject

func (s *ProjectsService) DeleteProject(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteProject removes a project including all associated resources (issues, merge requests etc.)

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#remove-project

func (*ProjectsService) DeleteProjectApprovalRule added in v0.39.1

func (s *ProjectsService) DeleteProjectApprovalRule(pid interface{}, approvalRule int, options ...RequestOptionFunc) (*Response, error)

DeleteProjectApprovalRule deletes a project-level approval rule.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#delete-project-level-rules

func (*ProjectsService) DeleteProjectForkRelation

func (s *ProjectsService) DeleteProjectForkRelation(pid int, options ...RequestOptionFunc) (*Response, error)

DeleteProjectForkRelation deletes an existing forked from relationship.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#delete-an-existing-forked-from-relationship

func (*ProjectsService) DeleteProjectHook

func (s *ProjectsService) DeleteProjectHook(pid interface{}, hook int, options ...RequestOptionFunc) (*Response, error)

DeleteProjectHook removes a hook from a project. This is an idempotent method and can be called multiple times. Either the hook is available or not.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#delete-project-hook

func (*ProjectsService) DeleteProjectPushRule added in v0.39.1

func (s *ProjectsService) DeleteProjectPushRule(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteProjectPushRule removes a push rule from a project. This is an idempotent method and can be called multiple times. Either the push rule is available or not.

GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#delete-project-push-rule

func (*ProjectsService) DeleteSharedProjectFromGroup added in v0.10.0

func (s *ProjectsService) DeleteSharedProjectFromGroup(pid interface{}, groupID int, options ...RequestOptionFunc) (*Response, error)

DeleteSharedProjectFromGroup allows to unshare a project from a group.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#delete-a-shared-project-link-within-a-group

func (*ProjectsService) EditProject

func (s *ProjectsService) EditProject(pid interface{}, opt *EditProjectOptions, options ...RequestOptionFunc) (*Project, *Response, error)

EditProject updates an existing project.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#edit-project

func (*ProjectsService) EditProjectHook

func (s *ProjectsService) EditProjectHook(pid interface{}, hook int, opt *EditProjectHookOptions, options ...RequestOptionFunc) (*ProjectHook, *Response, error)

EditProjectHook edits a hook for a specified project.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#edit-project-hook

func (*ProjectsService) EditProjectPushRule added in v0.39.1

func (s *ProjectsService) EditProjectPushRule(pid interface{}, opt *EditProjectPushRuleOptions, options ...RequestOptionFunc) (*ProjectPushRules, *Response, error)

EditProjectPushRule edits a push rule for a specified project.

GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#edit-project-push-rule

func (*ProjectsService) ForkProject

func (s *ProjectsService) ForkProject(pid interface{}, opt *ForkProjectOptions, options ...RequestOptionFunc) (*Project, *Response, error)

ForkProject forks a project into the user namespace of the authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#fork-project

func (*ProjectsService) GetApprovalConfiguration added in v0.39.1

func (s *ProjectsService) GetApprovalConfiguration(pid interface{}, options ...RequestOptionFunc) (*ProjectApprovals, *Response, error)

GetApprovalConfiguration get the approval configuration for a project.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-configuration

func (*ProjectsService) GetProject

func (s *ProjectsService) GetProject(pid interface{}, opt *GetProjectOptions, options ...RequestOptionFunc) (*Project, *Response, error)

GetProject gets a specific project, identified by project ID or NAMESPACE/PROJECT_NAME, which is owned by the authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#get-single-project

func (*ProjectsService) GetProjectApprovalRules added in v0.39.1

func (s *ProjectsService) GetProjectApprovalRules(pid interface{}, options ...RequestOptionFunc) ([]*ProjectApprovalRule, *Response, error)

GetProjectApprovalRules looks up the list of project level approvers.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-project-level-rules

func (*ProjectsService) GetProjectEvents

func (s *ProjectsService) GetProjectEvents(pid interface{}, opt *GetProjectEventsOptions, options ...RequestOptionFunc) ([]*ProjectEvent, *Response, error)

GetProjectEvents gets the events for the specified project. Sorted from newest to latest.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#get-project-events

func (*ProjectsService) GetProjectHook

func (s *ProjectsService) GetProjectHook(pid interface{}, hook int, options ...RequestOptionFunc) (*ProjectHook, *Response, error)

GetProjectHook gets a specific hook for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#get-project-hook

func (*ProjectsService) GetProjectLanguages added in v0.11.1

func (s *ProjectsService) GetProjectLanguages(pid interface{}, options ...RequestOptionFunc) (*ProjectLanguages, *Response, error)

GetProjectLanguages gets a list of languages used by the project

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#languages

func (*ProjectsService) GetProjectPushRules added in v0.39.1

func (s *ProjectsService) GetProjectPushRules(pid interface{}, options ...RequestOptionFunc) (*ProjectPushRules, *Response, error)

GetProjectPushRules gets the push rules of a project.

GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#get-project-push-rules

func (*ProjectsService) ListProjectForks added in v0.7.5

func (s *ProjectsService) ListProjectForks(pid interface{}, opt *ListProjectsOptions, options ...RequestOptionFunc) ([]*Project, *Response, error)

ListProjectForks gets a list of project forks.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-forks-of-a-project

func (*ProjectsService) ListProjectHooks

func (s *ProjectsService) ListProjectHooks(pid interface{}, opt *ListProjectHooksOptions, options ...RequestOptionFunc) ([]*ProjectHook, *Response, error)

ListProjectHooks gets a list of project hooks.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-project-hooks

func (*ProjectsService) ListProjects

func (s *ProjectsService) ListProjects(opt *ListProjectsOptions, options ...RequestOptionFunc) ([]*Project, *Response, error)

ListProjects gets a list of projects accessible by the authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-projects

func (*ProjectsService) ListProjectsUsers added in v0.8.0

func (s *ProjectsService) ListProjectsUsers(pid interface{}, opt *ListProjectUserOptions, options ...RequestOptionFunc) ([]*ProjectUser, *Response, error)

ListProjectsUsers gets a list of users for the given project.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#get-project-users

func (*ProjectsService) ListUserProjects added in v0.7.0

func (s *ProjectsService) ListUserProjects(uid interface{}, opt *ListProjectsOptions, options ...RequestOptionFunc) ([]*Project, *Response, error)

ListUserProjects gets a list of projects for the given user.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-user-projects

func (*ProjectsService) ShareProjectWithGroup added in v0.6.0

func (s *ProjectsService) ShareProjectWithGroup(pid interface{}, opt *ShareWithGroupOptions, options ...RequestOptionFunc) (*Response, error)

ShareProjectWithGroup allows to share a project with a group.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#share-project-with-group

func (*ProjectsService) StarProject added in v0.6.0

func (s *ProjectsService) StarProject(pid interface{}, options ...RequestOptionFunc) (*Project, *Response, error)

StarProject stars a given the project.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#star-a-project

func (*ProjectsService) StartMirroringProject added in v0.39.1

func (s *ProjectsService) StartMirroringProject(pid interface{}, options ...RequestOptionFunc) (*Response, error)

StartMirroringProject start the pull mirroring process for a project.

GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#start-the-pull-mirroring-process-for-a-project-starter

func (*ProjectsService) TransferProject added in v0.39.1

func (s *ProjectsService) TransferProject(pid interface{}, opt *TransferProjectOptions, options ...RequestOptionFunc) (*Project, *Response, error)

TransferProject transfer a project into the specified namespace

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#transfer-a-project-to-a-new-namespace

func (*ProjectsService) UnarchiveProject

func (s *ProjectsService) UnarchiveProject(pid interface{}, options ...RequestOptionFunc) (*Project, *Response, error)

UnarchiveProject unarchives the project if the user is either admin or the project owner of this project.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#unarchive-a-project

func (*ProjectsService) UnstarProject added in v0.6.0

func (s *ProjectsService) UnstarProject(pid interface{}, options ...RequestOptionFunc) (*Project, *Response, error)

UnstarProject unstars a given project.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#unstar-a-project

func (*ProjectsService) UpdateProjectApprovalRule added in v0.39.1

func (s *ProjectsService) UpdateProjectApprovalRule(pid interface{}, approvalRule int, opt *UpdateProjectLevelRuleOptions, options ...RequestOptionFunc) (*ProjectApprovalRule, *Response, error)

UpdateProjectApprovalRule updates an existing approval rule with new options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#update-project-level-rules

func (*ProjectsService) UploadFile added in v0.6.2

func (s *ProjectsService) UploadFile(pid interface{}, file string, options ...RequestOptionFunc) (*ProjectFile, *Response, error)

UploadFile upload a file from disk

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#upload-a-file

type ProtectBranchOptions added in v0.6.0

type ProtectBranchOptions struct {
	DevelopersCanPush  *bool `url:"developers_can_push,omitempty" json:"developers_can_push,omitempty"`
	DevelopersCanMerge *bool `url:"developers_can_merge,omitempty" json:"developers_can_merge,omitempty"`
}

ProtectBranchOptions represents the available ProtectBranch() options.

GitLab API docs: https://docs.gitlab.com/ce/api/branches.html#protect-repository-branch

type ProtectBranchPermissionOptions added in v0.39.1

type ProtectBranchPermissionOptions struct {
	UserID      *int              `url:"user_id,omitempty" json:"user_id,omitempty"`
	GroupID     *int              `url:"group_id,omitempty" json:"group_id,omitempty"`
	AccessLevel *AccessLevelValue `url:"access_level,omitempty" json:"access_level,omitempty"`
}

ProtectBranchPermissionOptions represents a branch permission option.

GitLab API docs: https://docs.gitlab.com/ce/api/protected_branches.html#protect-repository-branches

type ProtectRepositoryBranchesOptions added in v0.7.4

type ProtectRepositoryBranchesOptions struct {
	Name                      *string                           `url:"name,omitempty" json:"name,omitempty"`
	PushAccessLevel           *AccessLevelValue                 `url:"push_access_level,omitempty" json:"push_access_level,omitempty"`
	MergeAccessLevel          *AccessLevelValue                 `url:"merge_access_level,omitempty" json:"merge_access_level,omitempty"`
	UnprotectAccessLevel      *AccessLevelValue                 `url:"unprotect_access_level,omitempty" json:"unprotect_access_level,omitempty"`
	AllowedToPush             []*ProtectBranchPermissionOptions `url:"allowed_to_push,omitempty" json:"allowed_to_push,omitempty"`
	AllowedToMerge            []*ProtectBranchPermissionOptions `url:"allowed_to_merge,omitempty" json:"allowed_to_merge,omitempty"`
	AllowedToUnprotect        []*ProtectBranchPermissionOptions `url:"allowed_to_unprotect,omitempty" json:"allowed_to_unprotect,omitempty"`
	CodeOwnerApprovalRequired *bool                             `url:"code_owner_approval_required,omitempty" json:"code_owner_approval_required,omitempty"`
}

ProtectRepositoryBranchesOptions represents the available ProtectRepositoryBranches() options.

GitLab API docs: https://docs.gitlab.com/ce/api/protected_branches.html#protect-repository-branches

type ProtectRepositoryTagsOptions added in v0.39.1

type ProtectRepositoryTagsOptions struct {
	Name              *string           `url:"name" json:"name"`
	CreateAccessLevel *AccessLevelValue `url:"create_access_level,omitempty" json:"create_access_level,omitempty"`
}

ProtectRepositoryTagsOptions represents the available ProtectRepositoryTags() options.

GitLab API docs: https://docs.gitlab.com/ee/api/protected_tags.html#protect-repository-tags

type ProtectedBranch added in v0.7.4

type ProtectedBranch struct {
	ID                        int                        `json:"id"`
	Name                      string                     `json:"name"`
	PushAccessLevels          []*BranchAccessDescription `json:"push_access_levels"`
	MergeAccessLevels         []*BranchAccessDescription `json:"merge_access_levels"`
	UnprotectAccessLevels     []*BranchAccessDescription `json:"unprotect_access_levels"`
	CodeOwnerApprovalRequired bool                       `json:"code_owner_approval_required"`
}

ProtectedBranch represents a protected branch.

GitLab API docs: https://docs.gitlab.com/ce/api/protected_branches.html#list-protected-branches

type ProtectedBranchesService added in v0.7.4

type ProtectedBranchesService struct {
	// contains filtered or unexported fields
}

ProtectedBranchesService handles communication with the protected branch related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/protected_branches.html#protected-branches-api

func (*ProtectedBranchesService) GetProtectedBranch added in v0.7.4

func (s *ProtectedBranchesService) GetProtectedBranch(pid interface{}, branch string, options ...RequestOptionFunc) (*ProtectedBranch, *Response, error)

GetProtectedBranch gets a single protected branch or wildcard protected branch.

GitLab API docs: https://docs.gitlab.com/ce/api/protected_branches.html#get-a-single-protected-branch-or-wildcard-protected-branch

func (*ProtectedBranchesService) ListProtectedBranches added in v0.7.4

func (s *ProtectedBranchesService) ListProtectedBranches(pid interface{}, opt *ListProtectedBranchesOptions, options ...RequestOptionFunc) ([]*ProtectedBranch, *Response, error)

ListProtectedBranches gets a list of protected branches from a project.

GitLab API docs: https://docs.gitlab.com/ce/api/protected_branches.html#list-protected-branches

func (*ProtectedBranchesService) ProtectRepositoryBranches added in v0.7.4

func (s *ProtectedBranchesService) ProtectRepositoryBranches(pid interface{}, opt *ProtectRepositoryBranchesOptions, options ...RequestOptionFunc) (*ProtectedBranch, *Response, error)

ProtectRepositoryBranches protects a single repository branch or several project repository branches using a wildcard protected branch.

GitLab API docs: https://docs.gitlab.com/ce/api/protected_branches.html#protect-repository-branches

func (*ProtectedBranchesService) RequireCodeOwnerApprovals added in v0.39.1

func (s *ProtectedBranchesService) RequireCodeOwnerApprovals(pid interface{}, branch string, opt *RequireCodeOwnerApprovalsOptions, options ...RequestOptionFunc) (*Response, error)

RequireCodeOwnerApprovals updates the code owner approval.

Gitlab API docs: https://docs.gitlab.com/ee/api/protected_branches.html#require-code-owner-approvals-for-a-single-branch

func (*ProtectedBranchesService) UnprotectRepositoryBranches added in v0.7.4

func (s *ProtectedBranchesService) UnprotectRepositoryBranches(pid interface{}, branch string, options ...RequestOptionFunc) (*Response, error)

UnprotectRepositoryBranches unprotects the given protected branch or wildcard protected branch.

GitLab API docs: https://docs.gitlab.com/ce/api/protected_branches.html#unprotect-repository-branches

type ProtectedTag added in v0.39.1

type ProtectedTag struct {
	Name               string                  `json:"name"`
	CreateAccessLevels []*TagAccessDescription `json:"create_access_levels"`
}

ProtectedTag represents a protected tag.

GitLab API docs: https://docs.gitlab.com/ee/api/protected_tags.html

type ProtectedTagsService added in v0.39.1

type ProtectedTagsService struct {
	// contains filtered or unexported fields
}

ProtectedTagsService handles communication with the protected tag methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/protected_tags.html

func (*ProtectedTagsService) GetProtectedTag added in v0.39.1

func (s *ProtectedTagsService) GetProtectedTag(pid interface{}, tag string, options ...RequestOptionFunc) (*ProtectedTag, *Response, error)

GetProtectedTag returns a single protected tag or wildcard protected tag.

GitLab API docs: https://docs.gitlab.com/ee/api/protected_tags.html#get-a-single-protected-tag-or-wildcard-protected-tag

func (*ProtectedTagsService) ListProtectedTags added in v0.39.1

func (s *ProtectedTagsService) ListProtectedTags(pid interface{}, opt *ListProtectedTagsOptions, options ...RequestOptionFunc) ([]*ProtectedTag, *Response, error)

ListProtectedTags returns a list of protected tags from a project.

GitLab API docs: https://docs.gitlab.com/ee/api/protected_tags.html#list-protected-tags

func (*ProtectedTagsService) ProtectRepositoryTags added in v0.39.1

func (s *ProtectedTagsService) ProtectRepositoryTags(pid interface{}, opt *ProtectRepositoryTagsOptions, options ...RequestOptionFunc) (*ProtectedTag, *Response, error)

ProtectRepositoryTags protects a single repository tag or several project repository tags using a wildcard protected tag.

GitLab API docs: https://docs.gitlab.com/ee/api/protected_tags.html#protect-repository-tags

func (*ProtectedTagsService) UnprotectRepositoryTags added in v0.39.1

func (s *ProtectedTagsService) UnprotectRepositoryTags(pid interface{}, tag string, options ...RequestOptionFunc) (*Response, error)

UnprotectRepositoryTags unprotects the given protected tag or wildcard protected tag.

GitLab API docs: https://docs.gitlab.com/ee/api/protected_tags.html#unprotect-repository-tags

type PushEvent added in v0.3.1

type PushEvent struct {
	ObjectKind   string `json:"object_kind"`
	Before       string `json:"before"`
	After        string `json:"after"`
	Ref          string `json:"ref"`
	CheckoutSHA  string `json:"checkout_sha"`
	UserID       int    `json:"user_id"`
	UserName     string `json:"user_name"`
	UserUsername string `json:"user_username"`
	UserEmail    string `json:"user_email"`
	UserAvatar   string `json:"user_avatar"`
	ProjectID    int    `json:"project_id"`
	Project      struct {
		Name              string          `json:"name"`
		Description       string          `json:"description"`
		AvatarURL         string          `json:"avatar_url"`
		GitSSHURL         string          `json:"git_ssh_url"`
		GitHTTPURL        string          `json:"git_http_url"`
		Namespace         string          `json:"namespace"`
		PathWithNamespace string          `json:"path_with_namespace"`
		DefaultBranch     string          `json:"default_branch"`
		Homepage          string          `json:"homepage"`
		URL               string          `json:"url"`
		SSHURL            string          `json:"ssh_url"`
		HTTPURL           string          `json:"http_url"`
		WebURL            string          `json:"web_url"`
		Visibility        VisibilityValue `json:"visibility"`
	} `json:"project"`
	Repository *Repository `json:"repository"`
	Commits    []*struct {
		ID        string     `json:"id"`
		Message   string     `json:"message"`
		Timestamp *time.Time `json:"timestamp"`
		URL       string     `json:"url"`
		Author    struct {
			Name  string `json:"name"`
			Email string `json:"email"`
		} `json:"author"`
		Added    []string `json:"added"`
		Modified []string `json:"modified"`
		Removed  []string `json:"removed"`
	} `json:"commits"`
	TotalCommitsCount int `json:"total_commits_count"`
}

PushEvent represents a push event.

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#push-events

type PushSystemEvent added in v0.39.1

type PushSystemEvent struct {
	BaseSystemEvent
}

PushSystemEvent represents a push system event.

GitLab API docs: https://docs.gitlab.com/ee/system_hooks/system_hooks.html

type QueueMetrics added in v0.8.1

type QueueMetrics struct {
	Queues map[string]struct {
		Backlog int `json:"backlog"`
		Latency int `json:"latency"`
	} `json:"queues"`
}

QueueMetrics represents the GitLab sidekiq queue metrics.

GitLab API docs: https://docs.gitlab.com/ce/api/sidekiq_metrics.html#get-the-current-queue-metrics

type RateLimiter added in v0.39.1

type RateLimiter interface {
	Wait(context.Context) error
}

RateLimiter describes the interface that all (custom) rate limiters must implement.

type RegisterNewRunnerOptions added in v0.11.0

type RegisterNewRunnerOptions struct {
	Token          *string  `url:"token" json:"token"`
	Description    *string  `url:"description,omitempty" json:"description,omitempty"`
	Info           *string  `url:"info,omitempty" json:"info,omitempty"`
	Active         *bool    `url:"active,omitempty" json:"active,omitempty"`
	Locked         *bool    `url:"locked,omitempty" json:"locked,omitempty"`
	RunUntagged    *bool    `url:"run_untagged,omitempty" json:"run_untagged,omitempty"`
	TagList        []string `url:"tag_list[],omitempty" json:"tag_list,omitempty"`
	MaximumTimeout *int     `url:"maximum_timeout,omitempty" json:"maximum_timeout,omitempty"`
}

RegisterNewRunnerOptions represents the available RegisterNewRunner() options.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#register-a-new-runner

type RegistryRepository added in v0.39.1

type RegistryRepository struct {
	ID        int        `json:"id"`
	Name      string     `json:"name"`
	Path      string     `json:"path"`
	Location  string     `json:"location"`
	CreatedAt *time.Time `json:"created_at"`
}

RegistryRepository represents a GitLab content registry repository.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html

func (RegistryRepository) String added in v0.39.1

func (s RegistryRepository) String() string

type RegistryRepositoryTag added in v0.39.1

type RegistryRepositoryTag struct {
	Name          string     `json:"name"`
	Path          string     `json:"path"`
	Location      string     `json:"location"`
	Revision      string     `json:"revision"`
	ShortRevision string     `json:"short_revision"`
	Digest        string     `json:"digest"`
	CreatedAt     *time.Time `json:"created_at"`
	TotalSize     int        `json:"total_size"`
}

RegistryRepositoryTag represents a GitLab registry image tag.

GitLab API docs: https://docs.gitlab.com/ee/api/container_registry.html

func (RegistryRepositoryTag) String added in v0.39.1

func (s RegistryRepositoryTag) String() string

type Release added in v0.10.0

type Release struct {
	TagName         string     `json:"tag_name"`
	Name            string     `json:"name"`
	Description     string     `json:"description,omitempty"`
	DescriptionHTML string     `json:"description_html,omitempty"`
	CreatedAt       *time.Time `json:"created_at,omitempty"`
	Author          struct {
		ID        int    `json:"id"`
		Name      string `json:"name"`
		Username  string `json:"username"`
		State     string `json:"state"`
		AvatarURL string `json:"avatar_url"`
		WebURL    string `json:"web_url"`
	} `json:"author"`
	Commit Commit `json:"commit"`
	Assets struct {
		Count   int `json:"count"`
		Sources []struct {
			Format string `json:"format"`
			URL    string `json:"url"`
		} `json:"sources"`
		Links []*ReleaseLink `json:"links"`
	} `json:"assets"`
}

Release represents a project release.

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#list-releases

type ReleaseAssetLink struct {
	Name string `url:"name" json:"name"`
	URL  string `url:"url" json:"url"`
}

ReleaseAssetLink represents release asset link in CreateRelease() options

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#create-a-release

type ReleaseAssets added in v0.39.1

type ReleaseAssets struct {
	Links []*ReleaseAssetLink `url:"links" json:"links"`
}

ReleaseAssets represents release assets in CreateRelease() options

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#create-a-release

type ReleaseLink struct {
	ID       int    `json:"id"`
	Name     string `json:"name"`
	URL      string `json:"url"`
	External bool   `json:"external"`
}

ReleaseLink represents a release link.

GitLab API docs: https://docs.gitlab.com/ee/api/releases/links.html

type ReleaseLinksService added in v0.39.1

type ReleaseLinksService struct {
	// contains filtered or unexported fields
}

ReleaseLinksService handles communication with the release link methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/releases/links.html

func (s *ReleaseLinksService) CreateReleaseLink(pid interface{}, tagName string, opt *CreateReleaseLinkOptions, options ...RequestOptionFunc) (*ReleaseLink, *Response, error)

CreateReleaseLink creates a link.

GitLab API docs: https://docs.gitlab.com/ee/api/releases/links.html#create-a-link

func (s *ReleaseLinksService) DeleteReleaseLink(pid interface{}, tagName string, link int, options ...RequestOptionFunc) (*ReleaseLink, *Response, error)

DeleteReleaseLink deletes a link from release.

GitLab API docs: https://docs.gitlab.com/ee/api/releases/links.html#delete-a-link

func (s *ReleaseLinksService) GetReleaseLink(pid interface{}, tagName string, link int, options ...RequestOptionFunc) (*ReleaseLink, *Response, error)

GetReleaseLink returns a link from release assets.

GitLab API docs: https://docs.gitlab.com/ee/api/releases/links.html#get-a-link

func (s *ReleaseLinksService) ListReleaseLinks(pid interface{}, tagName string, opt *ListReleaseLinksOptions, options ...RequestOptionFunc) ([]*ReleaseLink, *Response, error)

ListReleaseLinks gets assets as links from a Release.

GitLab API docs: https://docs.gitlab.com/ee/api/releases/links.html#get-links

func (s *ReleaseLinksService) UpdateReleaseLink(pid interface{}, tagName string, link int, opt *UpdateReleaseLinkOptions, options ...RequestOptionFunc) (*ReleaseLink, *Response, error)

UpdateReleaseLink updates an asset link.

GitLab API docs: https://docs.gitlab.com/ee/api/releases/links.html#update-a-link

type ReleaseNote added in v0.39.1

type ReleaseNote struct {
	TagName     string `json:"tag_name"`
	Description string `json:"description"`
}

ReleaseNote represents a GitLab version release.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html

type ReleasesService added in v0.39.1

type ReleasesService struct {
	// contains filtered or unexported fields
}

ReleasesService handles communication with the releases methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html

func (*ReleasesService) CreateRelease added in v0.39.1

func (s *ReleasesService) CreateRelease(pid interface{}, opts *CreateReleaseOptions, options ...RequestOptionFunc) (*Release, *Response, error)

CreateRelease creates a release.

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#create-a-release

func (*ReleasesService) DeleteRelease added in v0.39.1

func (s *ReleasesService) DeleteRelease(pid interface{}, tagName string, options ...RequestOptionFunc) (*Release, *Response, error)

DeleteRelease deletes a release.

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#delete-a-release

func (*ReleasesService) GetRelease added in v0.39.1

func (s *ReleasesService) GetRelease(pid interface{}, tagName string, options ...RequestOptionFunc) (*Release, *Response, error)

GetRelease returns a single release, identified by a tag name.

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#get-a-release-by-a-tag-name

func (*ReleasesService) ListReleases added in v0.39.1

func (s *ReleasesService) ListReleases(pid interface{}, opt *ListReleasesOptions, options ...RequestOptionFunc) ([]*Release, *Response, error)

ListReleases gets a pagenated of releases accessible by the authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#list-releases

func (*ReleasesService) UpdateRelease added in v0.39.1

func (s *ReleasesService) UpdateRelease(pid interface{}, tagName string, opts *UpdateReleaseOptions, options ...RequestOptionFunc) (*Release, *Response, error)

UpdateRelease updates a release.

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#update-a-release

type RepositoriesService

type RepositoriesService struct {
	// contains filtered or unexported fields
}

RepositoriesService handles communication with the repositories related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html

func (*RepositoriesService) Archive

func (s *RepositoriesService) Archive(pid interface{}, opt *ArchiveOptions, options ...RequestOptionFunc) ([]byte, *Response, error)

Archive gets an archive of the repository.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#get-file-archive

func (*RepositoriesService) Blob added in v0.39.1

func (s *RepositoriesService) Blob(pid interface{}, sha string, options ...RequestOptionFunc) ([]byte, *Response, error)

Blob gets information about blob in repository like size and content. Note that blob content is Base64 encoded.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#get-a-blob-from-repository

func (*RepositoriesService) Compare

func (s *RepositoriesService) Compare(pid interface{}, opt *CompareOptions, options ...RequestOptionFunc) (*Compare, *Response, error)

Compare compares branches, tags or commits.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits

func (*RepositoriesService) Contributors

func (s *RepositoriesService) Contributors(pid interface{}, opt *ListContributorsOptions, options ...RequestOptionFunc) ([]*Contributor, *Response, error)

Contributors gets the repository contributors list.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributors

func (*RepositoriesService) ListTree

func (s *RepositoriesService) ListTree(pid interface{}, opt *ListTreeOptions, options ...RequestOptionFunc) ([]*TreeNode, *Response, error)

ListTree gets a list of repository files and directories in a project.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#list-repository-tree

func (*RepositoriesService) MergeBase added in v0.39.1

func (s *RepositoriesService) MergeBase(pid interface{}, opt *MergeBaseOptions, options ...RequestOptionFunc) (*Commit, *Response, error)

MergeBase gets the common ancestor for 2 refs (commit SHAs, branch names or tags).

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#merge-base

func (*RepositoriesService) RawBlobContent

func (s *RepositoriesService) RawBlobContent(pid interface{}, sha string, options ...RequestOptionFunc) ([]byte, *Response, error)

RawBlobContent gets the raw file contents for a blob by blob SHA.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#raw-blob-content

func (*RepositoriesService) StreamArchive added in v0.39.1

func (s *RepositoriesService) StreamArchive(pid interface{}, w io.Writer, opt *ArchiveOptions, options ...RequestOptionFunc) (*Response, error)

StreamArchive streams an archive of the repository to the provided io.Writer.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#get-file-archive

type Repository added in v0.3.1

type Repository struct {
	Name              string          `json:"name"`
	Description       string          `json:"description"`
	WebURL            string          `json:"web_url"`
	AvatarURL         string          `json:"avatar_url"`
	GitSSHURL         string          `json:"git_ssh_url"`
	GitHTTPURL        string          `json:"git_http_url"`
	Namespace         string          `json:"namespace"`
	Visibility        VisibilityValue `json:"visibility"`
	PathWithNamespace string          `json:"path_with_namespace"`
	DefaultBranch     string          `json:"default_branch"`
	Homepage          string          `json:"homepage"`
	URL               string          `json:"url"`
	SSHURL            string          `json:"ssh_url"`
	HTTPURL           string          `json:"http_url"`
}

Repository represents a repository.

type RepositoryFilesService

type RepositoryFilesService struct {
	// contains filtered or unexported fields
}

RepositoryFilesService handles communication with the repository files related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html

func (*RepositoryFilesService) CreateFile

func (s *RepositoryFilesService) CreateFile(pid interface{}, fileName string, opt *CreateFileOptions, options ...RequestOptionFunc) (*FileInfo, *Response, error)

CreateFile creates a new file in a repository.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository

func (*RepositoryFilesService) DeleteFile

func (s *RepositoryFilesService) DeleteFile(pid interface{}, fileName string, opt *DeleteFileOptions, options ...RequestOptionFunc) (*Response, error)

DeleteFile deletes an existing file in a repository

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository

func (*RepositoryFilesService) GetFile

func (s *RepositoryFilesService) GetFile(pid interface{}, fileName string, opt *GetFileOptions, options ...RequestOptionFunc) (*File, *Response, error)

GetFile allows you to receive information about a file in repository like name, size, content. Note that file content is Base64 encoded.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-repository

func (*RepositoryFilesService) GetFileBlame added in v0.39.1

func (s *RepositoryFilesService) GetFileBlame(pid interface{}, file string, opt *GetFileBlameOptions, options ...RequestOptionFunc) ([]*FileBlameRange, *Response, error)

GetFileBlame allows you to receive blame information. Each blame range contains lines and corresponding commit info.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#get-file-blame-from-repository

func (*RepositoryFilesService) GetFileMetaData added in v0.39.1

func (s *RepositoryFilesService) GetFileMetaData(pid interface{}, fileName string, opt *GetFileMetaDataOptions, options ...RequestOptionFunc) (*File, *Response, error)

GetFileMetaData allows you to receive meta information about a file in repository like name, size.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-repository

func (*RepositoryFilesService) GetRawFile added in v0.6.0

func (s *RepositoryFilesService) GetRawFile(pid interface{}, fileName string, opt *GetRawFileOptions, options ...RequestOptionFunc) ([]byte, *Response, error)

GetRawFile allows you to receive the raw file in repository.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#get-raw-file-from-repository

func (*RepositoryFilesService) UpdateFile

func (s *RepositoryFilesService) UpdateFile(pid interface{}, fileName string, opt *UpdateFileOptions, options ...RequestOptionFunc) (*FileInfo, *Response, error)

UpdateFile updates an existing file in a repository

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository

type RepositoryUpdateSystemEvent added in v0.39.1

type RepositoryUpdateSystemEvent struct {
	BaseSystemEvent
}

RepositoryUpdateSystemEvent represents a repository updated system event.

GitLab API docs: https://docs.gitlab.com/ee/system_hooks/system_hooks.html

type RequestOptionFunc added in v0.39.1

type RequestOptionFunc func(*retryablehttp.Request) error

RequestOptionFunc can be passed to all API requests to customize the API request.

func WithContext added in v0.5.0

func WithContext(ctx context.Context) RequestOptionFunc

WithContext runs the request with the provided context

func WithSudo added in v0.4.0

func WithSudo(uid interface{}) RequestOptionFunc

WithSudo takes either a username or user ID and sets the SUDO request header

type RequireCodeOwnerApprovalsOptions added in v0.39.1

type RequireCodeOwnerApprovalsOptions struct {
	CodeOwnerApprovalRequired *bool `url:"code_owner_approval_required,omitempty" json:"code_owner_approval_required,omitempty"`
}

RequireCodeOwnerApprovalsOptions represents the available RequireCodeOwnerApprovals() options.

GitLab API docs: https://docs.gitlab.com/ee/api/protected_branches.html#require-code-owner-approvals-for-a-single-branch

type ResolveMergeRequestDiscussionOptions added in v0.11.2

type ResolveMergeRequestDiscussionOptions struct {
	Resolved *bool `url:"resolved,omitempty" json:"resolved,omitempty"`
}

ResolveMergeRequestDiscussionOptions represents the available ResolveMergeRequestDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#resolve-a-merge-request-thread

type ResourceLabelEventsService added in v0.39.1

type ResourceLabelEventsService struct {
	// contains filtered or unexported fields
}

ResourceLabelEventsService handles communication with the event related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ee/api/resource_label_events.html

func (*ResourceLabelEventsService) GetGroupEpicLabelEvent added in v0.39.1

func (s *ResourceLabelEventsService) GetGroupEpicLabelEvent(gid interface{}, epic int, event int, options ...RequestOptionFunc) (*LabelEvent, *Response, error)

GetGroupEpicLabelEvent gets a single group epic label event.

GitLab API docs: https://docs.gitlab.com/ee/api/resource_label_events.html#get-single-epic-label-event

func (*ResourceLabelEventsService) GetIssueLabelEvent added in v0.39.1

func (s *ResourceLabelEventsService) GetIssueLabelEvent(pid interface{}, issue int, event int, options ...RequestOptionFunc) (*LabelEvent, *Response, error)

GetIssueLabelEvent gets a single issue-label-event.

GitLab API docs: https://docs.gitlab.com/ee/api/resource_label_events.html#get-single-issue-label-event

func (*ResourceLabelEventsService) GetMergeRequestLabelEvent added in v0.39.1

func (s *ResourceLabelEventsService) GetMergeRequestLabelEvent(pid interface{}, request int, event int, options ...RequestOptionFunc) (*LabelEvent, *Response, error)

GetMergeRequestLabelEvent gets a single merge request label event.

GitLab API docs: https://docs.gitlab.com/ee/api/resource_label_events.html#get-single-merge-request-label-event

func (*ResourceLabelEventsService) ListGroupEpicLabelEvents added in v0.39.1

func (s *ResourceLabelEventsService) ListGroupEpicLabelEvents(gid interface{}, epic int, opt *ListLabelEventsOptions, options ...RequestOptionFunc) ([]*LabelEvent, *Response, error)

ListGroupEpicLabelEvents retrieves resource label events for the specified group and epic.

GitLab API docs: https://docs.gitlab.com/ee/api/resource_label_events.html#list-group-epic-label-events

func (*ResourceLabelEventsService) ListIssueLabelEvents added in v0.39.1

func (s *ResourceLabelEventsService) ListIssueLabelEvents(pid interface{}, issue int, opt *ListLabelEventsOptions, options ...RequestOptionFunc) ([]*LabelEvent, *Response, error)

ListIssueLabelEvents retrieves resource label events for the specified project and issue.

GitLab API docs: https://docs.gitlab.com/ee/api/resource_label_events.html#list-project-issue-label-events

func (*ResourceLabelEventsService) ListMergeLabelEvents added in v0.39.1

func (s *ResourceLabelEventsService) ListMergeLabelEvents(pid interface{}, request int, opt *ListLabelEventsOptions, options ...RequestOptionFunc) ([]*LabelEvent, *Response, error)

ListMergeLabelEvents retrieves resource label events for the specified project and merge request.

GitLab API docs: https://docs.gitlab.com/ee/api/resource_label_events.html#list-project-merge-request-label-events

type Response

type Response struct {
	*http.Response

	// These fields provide the page values for paginating through a set of
	// results. Any or all of these may be set to the zero value for
	// responses that are not part of a paginated set, or for which there
	// are no additional pages.
	TotalItems   int
	TotalPages   int
	ItemsPerPage int
	CurrentPage  int
	NextPage     int
	PreviousPage int
}

Response is a GitLab API response. This wraps the standard http.Response returned from GitLab and provides convenient access to things like pagination links.

type RevertCommitOptions added in v0.39.1

type RevertCommitOptions struct {
	Branch *string `url:"branch,omitempty" json:"branch,omitempty"`
}

RevertCommitOptions represents the available RevertCommit() options.

GitLab API docs: https://docs.gitlab.com/ee/api/commits.html#revert-a-commit

type RunPipelineTriggerOptions added in v0.7.0

type RunPipelineTriggerOptions struct {
	Ref       *string           `url:"ref" json:"ref"`
	Token     *string           `url:"token" json:"token"`
	Variables map[string]string `url:"variables,omitempty" json:"variables,omitempty"`
}

RunPipelineTriggerOptions represents the available RunPipelineTrigger() options.

GitLab API docs: https://docs.gitlab.com/ce/ci/triggers/README.html#triggering-a-pipeline

type Runner added in v0.7.5

type Runner struct {
	ID          int    `json:"id"`
	Description string `json:"description"`
	Active      bool   `json:"active"`
	IsShared    bool   `json:"is_shared"`
	IPAddress   string `json:"ip_address"`
	Name        string `json:"name"`
	Online      bool   `json:"online"`
	Status      string `json:"status"`
	Token       string `json:"token"`
}

Runner represents a GitLab CI Runner.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html

type RunnerDetails added in v0.8.0

type RunnerDetails struct {
	Active       bool       `json:"active"`
	Architecture string     `json:"architecture"`
	Description  string     `json:"description"`
	ID           int        `json:"id"`
	IPAddress    string     `json:"ip_address"`
	IsShared     bool       `json:"is_shared"`
	ContactedAt  *time.Time `json:"contacted_at"`
	Name         string     `json:"name"`
	Online       bool       `json:"online"`
	Status       string     `json:"status"`
	Platform     string     `json:"platform"`
	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"`
	Token          string   `json:"token"`
	Revision       string   `json:"revision"`
	TagList        []string `json:"tag_list"`
	Version        string   `json:"version"`
	Locked         bool     `json:"locked"`
	AccessLevel    string   `json:"access_level"`
	MaximumTimeout int      `json:"maximum_timeout"`
	Groups         []struct {
		ID     int    `json:"id"`
		Name   string `json:"name"`
		WebURL string `json:"web_url"`
	} `json:"groups"`
}

RunnerDetails represents the GitLab CI runner details.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html

type RunnersService added in v0.7.5

type RunnersService struct {
	// contains filtered or unexported fields
}

RunnersService handles communication with the runner related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html

func (*RunnersService) DeleteRegisteredRunner added in v0.11.0

func (s *RunnersService) DeleteRegisteredRunner(opt *DeleteRegisteredRunnerOptions, options ...RequestOptionFunc) (*Response, error)

DeleteRegisteredRunner registers a new Runner for the instance.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#delete-a-registered-runner

func (*RunnersService) DisableProjectRunner added in v0.8.0

func (s *RunnersService) DisableProjectRunner(pid interface{}, runner int, options ...RequestOptionFunc) (*Response, error)

DisableProjectRunner disables a specific runner from project.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#disable-a-runner-from-project

func (*RunnersService) EnableProjectRunner added in v0.7.5

func (s *RunnersService) EnableProjectRunner(pid interface{}, opt *EnableProjectRunnerOptions, options ...RequestOptionFunc) (*Runner, *Response, error)

EnableProjectRunner enables an available specific runner in the project.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#enable-a-runner-in-project

func (*RunnersService) GetRunnerDetails added in v0.8.0

func (s *RunnersService) GetRunnerDetails(rid interface{}, options ...RequestOptionFunc) (*RunnerDetails, *Response, error)

GetRunnerDetails returns details for given runner.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#get-runner-39-s-details

func (*RunnersService) ListAllRunners added in v0.7.5

func (s *RunnersService) ListAllRunners(opt *ListRunnersOptions, options ...RequestOptionFunc) ([]*Runner, *Response, error)

ListAllRunners gets a list of all runners in the GitLab instance. Access is restricted to users with admin privileges.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#list-all-runners

func (*RunnersService) ListGroupsRunners added in v0.39.1

func (s *RunnersService) ListGroupsRunners(gid interface{}, opt *ListGroupsRunnersOptions, options ...RequestOptionFunc) ([]*Runner, *Response, error)

ListGroupsRunners lists all runners (specific and shared) available in the group as well it’s ancestor groups. Shared runners are listed if at least one shared runner is defined.

GitLab API docs: https://docs.gitlab.com/ee/api/runners.html#list-groups-runners

func (*RunnersService) ListProjectRunners added in v0.7.5

func (s *RunnersService) ListProjectRunners(pid interface{}, opt *ListProjectRunnersOptions, options ...RequestOptionFunc) ([]*Runner, *Response, error)

ListProjectRunners gets a list of runners accessible by the authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#list-project-s-runners

func (*RunnersService) ListRunnerJobs added in v0.8.0

func (s *RunnersService) ListRunnerJobs(rid interface{}, opt *ListRunnerJobsOptions, options ...RequestOptionFunc) ([]*Job, *Response, error)

ListRunnerJobs gets a list of jobs that are being processed or were processed by specified Runner.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#list-runner-39-s-jobs

func (*RunnersService) ListRunners added in v0.7.5

func (s *RunnersService) ListRunners(opt *ListRunnersOptions, options ...RequestOptionFunc) ([]*Runner, *Response, error)

ListRunners gets a list of runners accessible by the authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#list-owned-runners

func (*RunnersService) RegisterNewRunner added in v0.11.0

func (s *RunnersService) RegisterNewRunner(opt *RegisterNewRunnerOptions, options ...RequestOptionFunc) (*Runner, *Response, error)

RegisterNewRunner registers a new Runner for the instance.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#register-a-new-runner

func (*RunnersService) RemoveRunner added in v0.8.0

func (s *RunnersService) RemoveRunner(rid interface{}, options ...RequestOptionFunc) (*Response, error)

RemoveRunner removes a runner.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#remove-a-runner

func (*RunnersService) UpdateRunnerDetails added in v0.8.0

func (s *RunnersService) UpdateRunnerDetails(rid interface{}, opt *UpdateRunnerDetailsOptions, options ...RequestOptionFunc) (*RunnerDetails, *Response, error)

UpdateRunnerDetails updates details for a given runner.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#update-runner-39-s-details

func (*RunnersService) VerifyRegisteredRunner added in v0.11.0

func (s *RunnersService) VerifyRegisteredRunner(opt *VerifyRegisteredRunnerOptions, options ...RequestOptionFunc) (*Response, error)

VerifyRegisteredRunner registers a new Runner for the instance.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#verify-authentication-for-a-registered-runner

type SSHKey

type SSHKey struct {
	ID        int        `json:"id"`
	Title     string     `json:"title"`
	Key       string     `json:"key"`
	CreatedAt *time.Time `json:"created_at"`
}

SSHKey represents a SSH key.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-ssh-keys

type ScheduleExportOptions added in v0.39.1

type ScheduleExportOptions struct {
	Description *string `url:"description,omitempty" json:"description,omitempty"`
	Upload      struct {
		URL        *string `url:"url,omitempty" json:"url,omitempty"`
		HTTPMethod *string `url:"http_method,omitempty" json:"http_method,omitempty"`
	} `url:"upload,omitempty" json:"upload,omitempty"`
}

ScheduleExportOptions represents the available ScheduleExport() options.

GitLab API docs: https://docs.gitlab.com/ce/api/project_import_export.html#schedule-an-export

type SearchOptions added in v0.9.0

type SearchOptions ListOptions

SearchOptions represents the available options for all search methods.

GitLab API docs: https://docs.gitlab.com/ce/api/search.html

type SearchService added in v0.9.0

type SearchService struct {
	// contains filtered or unexported fields
}

SearchService handles communication with the search related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/search.html

func (*SearchService) Blobs added in v0.9.0

func (s *SearchService) Blobs(query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Blob, *Response, error)

Blobs searches the expression within all blobs

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-blobs

func (*SearchService) BlobsByGroup added in v0.9.0

func (s *SearchService) BlobsByGroup(gid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Blob, *Response, error)

BlobsByGroup searches the expression within blobs for the specified group

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-blobs

func (*SearchService) BlobsByProject added in v0.9.0

func (s *SearchService) BlobsByProject(pid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Blob, *Response, error)

BlobsByProject searches the expression within blobs for the specified project

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-blobs

func (*SearchService) Commits added in v0.9.0

func (s *SearchService) Commits(query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Commit, *Response, error)

Commits searches the expression within all commits

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-commits

func (*SearchService) CommitsByGroup added in v0.9.0

func (s *SearchService) CommitsByGroup(gid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Commit, *Response, error)

CommitsByGroup searches the expression within commits for the specified group

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-commits

func (*SearchService) CommitsByProject added in v0.9.0

func (s *SearchService) CommitsByProject(pid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Commit, *Response, error)

CommitsByProject searches the expression within commits for the specified project

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-commits

func (*SearchService) Issues added in v0.9.0

func (s *SearchService) Issues(query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

Issues searches the expression within issues

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-issues

func (*SearchService) IssuesByGroup added in v0.9.0

func (s *SearchService) IssuesByGroup(gid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

IssuesByGroup searches the expression within issues for the specified group

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-issues

func (*SearchService) IssuesByProject added in v0.9.0

func (s *SearchService) IssuesByProject(pid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Issue, *Response, error)

IssuesByProject searches the expression within issues for the specified project

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-issues

func (*SearchService) MergeRequests added in v0.9.0

func (s *SearchService) MergeRequests(query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

MergeRequests searches the expression within merge requests

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-merge_requests

func (*SearchService) MergeRequestsByGroup added in v0.9.0

func (s *SearchService) MergeRequestsByGroup(gid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

MergeRequestsByGroup searches the expression within merge requests for the specified group

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-merge_requests

func (*SearchService) MergeRequestsByProject added in v0.9.0

func (s *SearchService) MergeRequestsByProject(pid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*MergeRequest, *Response, error)

MergeRequestsByProject searches the expression within merge requests for the specified project

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-merge_requests

func (*SearchService) Milestones added in v0.9.0

func (s *SearchService) Milestones(query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Milestone, *Response, error)

Milestones searches the expression within milestones

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-milestones

func (*SearchService) MilestonesByGroup added in v0.9.0

func (s *SearchService) MilestonesByGroup(gid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Milestone, *Response, error)

MilestonesByGroup searches the expression within milestones for the specified group

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-milestones

func (*SearchService) MilestonesByProject added in v0.9.0

func (s *SearchService) MilestonesByProject(pid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Milestone, *Response, error)

MilestonesByProject searches the expression within milestones for the specified project

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-milestones

func (*SearchService) NotesByProject added in v0.9.0

func (s *SearchService) NotesByProject(pid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Note, *Response, error)

NotesByProject searches the expression within notes for the specified project

GitLab API docs: // https://docs.gitlab.com/ce/api/search.html#scope-notes

func (*SearchService) Projects added in v0.9.0

func (s *SearchService) Projects(query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Project, *Response, error)

Projects searches the expression within projects

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-projects

func (*SearchService) ProjectsByGroup added in v0.9.0

func (s *SearchService) ProjectsByGroup(gid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Project, *Response, error)

ProjectsByGroup searches the expression within projects for the specified group

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#group-search-api

func (*SearchService) SnippetBlobs added in v0.9.0

func (s *SearchService) SnippetBlobs(query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Snippet, *Response, error)

SnippetBlobs searches the expression within snippet blobs

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-snippet_blobs

func (*SearchService) SnippetTitles added in v0.9.0

func (s *SearchService) SnippetTitles(query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Snippet, *Response, error)

SnippetTitles searches the expression within snippet titles

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-snippet_titles

func (*SearchService) Users added in v0.39.1

func (s *SearchService) Users(query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*User, *Response, error)

Users searches the expression within all users

GitLab API docs: https://docs.gitlab.com/ee/api/search.html#scope-users

func (*SearchService) UsersByGroup added in v0.39.1

func (s *SearchService) UsersByGroup(gid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*User, *Response, error)

UsersByGroup searches the expression within users for the specified group

GitLab API docs: https://docs.gitlab.com/ee/api/search.html#scope-users-1

func (*SearchService) UsersByProject added in v0.39.1

func (s *SearchService) UsersByProject(pid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*User, *Response, error)

UsersByProject searches the expression within users for the specified project

GitLab API docs: https://docs.gitlab.com/ee/api/search.html#scope-users-2

func (*SearchService) WikiBlobs added in v0.9.0

func (s *SearchService) WikiBlobs(query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Wiki, *Response, error)

WikiBlobs searches the expression within all wiki blobs

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-wiki_blobs

func (*SearchService) WikiBlobsByGroup added in v0.9.0

func (s *SearchService) WikiBlobsByGroup(gid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Wiki, *Response, error)

WikiBlobsByGroup searches the expression within wiki blobs for specified group

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-wiki_blobs

func (*SearchService) WikiBlobsByProject added in v0.9.0

func (s *SearchService) WikiBlobsByProject(pid interface{}, query string, opt *SearchOptions, options ...RequestOptionFunc) ([]*Wiki, *Response, error)

WikiBlobsByProject searches the expression within wiki blobs for the specified project

GitLab API docs: https://docs.gitlab.com/ce/api/search.html#scope-wiki_blobs

type Service

type Service struct {
	ID                       int        `json:"id"`
	Title                    string     `json:"title"`
	CreatedAt                *time.Time `json:"created_at"`
	UpdatedAt                *time.Time `json:"updated_at"`
	Active                   bool       `json:"active"`
	PushEvents               bool       `json:"push_events"`
	IssuesEvents             bool       `json:"issues_events"`
	ConfidentialIssuesEvents bool       `json:"confidential_issues_events"`
	CommitEvents             bool       `json:"commit_events"`
	MergeRequestsEvents      bool       `json:"merge_requests_events"`
	CommentOnEventEnabled    bool       `json:"comment_on_event_enabled"`
	TagPushEvents            bool       `json:"tag_push_events"`
	NoteEvents               bool       `json:"note_events"`
	ConfidentialNoteEvents   bool       `json:"confidential_note_events"`
	PipelineEvents           bool       `json:"pipeline_events"`
	JobEvents                bool       `json:"job_events"`
	WikiPageEvents           bool       `json:"wiki_page_events"`
}

Service represents a GitLab service.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html

type ServicesService

type ServicesService struct {
	// contains filtered or unexported fields
}

ServicesService handles communication with the services related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html

func (*ServicesService) DeleteCustomIssueTrackerService added in v0.39.1

func (s *ServicesService) DeleteCustomIssueTrackerService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteCustomIssueTrackerService deletes Custom Issue Tracker service settings for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#delete-custom-issue-tracker-service

func (*ServicesService) DeleteDroneCIService

func (s *ServicesService) DeleteDroneCIService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteDroneCIService deletes Drone CI service settings for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#delete-drone-ci-service

func (*ServicesService) DeleteExternalWikiService added in v0.39.1

func (s *ServicesService) DeleteExternalWikiService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteExternalWikiService deletes External Wiki service for project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#delete-external-wiki-service

func (*ServicesService) DeleteGitLabCIService

func (s *ServicesService) DeleteGitLabCIService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteGitLabCIService deletes GitLab CI service settings for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#delete-gitlab-ci-service

func (*ServicesService) DeleteGithubService added in v0.39.1

func (s *ServicesService) DeleteGithubService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteGithubService deletes Github service for a project

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#delete-github-service

func (*ServicesService) DeleteHipChatService

func (s *ServicesService) DeleteHipChatService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteHipChatService deletes HipChat service for project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#delete-hipchat-service

func (*ServicesService) DeleteJenkinsCIService added in v0.7.5

func (s *ServicesService) DeleteJenkinsCIService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteJenkinsCIService deletes Jenkins CI service for project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#delete-jira-service

func (*ServicesService) DeleteJiraService added in v0.7.0

func (s *ServicesService) DeleteJiraService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteJiraService deletes Jira service for project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#delete-jira-service

func (*ServicesService) DeleteMicrosoftTeamsService added in v0.11.0

func (s *ServicesService) DeleteMicrosoftTeamsService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteMicrosoftTeamsService deletes Microsoft Teams service for project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#delete-microsoft-teams-service

func (*ServicesService) DeletePipelinesEmailService added in v0.39.1

func (s *ServicesService) DeletePipelinesEmailService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeletePipelinesEmailService deletes Pipelines Email service settings for a project.

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#delete-pipeline-emails-service

func (*ServicesService) DeleteSlackService

func (s *ServicesService) DeleteSlackService(pid interface{}, options ...RequestOptionFunc) (*Response, error)

DeleteSlackService deletes Slack service for project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#delete-slack-service

func (*ServicesService) GetCustomIssueTrackerService added in v0.39.1

func (s *ServicesService) GetCustomIssueTrackerService(pid interface{}, options ...RequestOptionFunc) (*CustomIssueTrackerService, *Response, error)

GetCustomIssueTrackerService gets Custom Issue Tracker service settings for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#get-custom-issue-tracker-service-settings

func (*ServicesService) GetDroneCIService

func (s *ServicesService) GetDroneCIService(pid interface{}, options ...RequestOptionFunc) (*DroneCIService, *Response, error)

GetDroneCIService gets Drone CI service settings for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#get-drone-ci-service-settings

func (*ServicesService) GetExternalWikiService added in v0.39.1

func (s *ServicesService) GetExternalWikiService(pid interface{}, options ...RequestOptionFunc) (*ExternalWikiService, *Response, error)

GetExternalWikiService gets External Wiki service settings for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#get-external-wiki-service-settings

func (*ServicesService) GetGithubService added in v0.39.1

func (s *ServicesService) GetGithubService(pid interface{}, options ...RequestOptionFunc) (*GithubService, *Response, error)

GetGithubService gets Github service settings for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#get-github-service-settings

func (*ServicesService) GetJenkinsCIService added in v0.7.5

func (s *ServicesService) GetJenkinsCIService(pid interface{}, options ...RequestOptionFunc) (*JenkinsCIService, *Response, error)

GetJenkinsCIService gets Jenkins CI service settings for a project.

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#get-jenkins-ci-service-settings

func (*ServicesService) GetJiraService added in v0.7.0

func (s *ServicesService) GetJiraService(pid interface{}, options ...RequestOptionFunc) (*JiraService, *Response, error)

GetJiraService gets Jira service settings for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#get-jira-service-settings

func (*ServicesService) GetMicrosoftTeamsService added in v0.11.0

func (s *ServicesService) GetMicrosoftTeamsService(pid interface{}, options ...RequestOptionFunc) (*MicrosoftTeamsService, *Response, error)

GetMicrosoftTeamsService gets MicrosoftTeams service settings for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#get-microsoft-teams-service-settings

func (*ServicesService) GetPipelinesEmailService added in v0.39.1

func (s *ServicesService) GetPipelinesEmailService(pid interface{}, options ...RequestOptionFunc) (*PipelinesEmailService, *Response, error)

GetPipelinesEmailService gets Pipelines Email service settings for a project.

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#get-pipeline-emails-service-settings

func (*ServicesService) GetSlackService added in v0.6.2

func (s *ServicesService) GetSlackService(pid interface{}, options ...RequestOptionFunc) (*SlackService, *Response, error)

GetSlackService gets Slack service settings for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#get-slack-service-settings

func (*ServicesService) ListServices added in v0.39.1

func (s *ServicesService) ListServices(pid interface{}, options ...RequestOptionFunc) ([]*Service, *Response, error)

ListServices gets a list of all active services.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#list-all-active-services

func (*ServicesService) SetCustomIssueTrackerService added in v0.39.1

func (s *ServicesService) SetCustomIssueTrackerService(pid interface{}, opt *SetCustomIssueTrackerServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetCustomIssueTrackerService sets Custom Issue Tracker service for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#createedit-custom-issue-tracker-service

func (*ServicesService) SetDroneCIService

func (s *ServicesService) SetDroneCIService(pid interface{}, opt *SetDroneCIServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetDroneCIService sets Drone CI service for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#createedit-drone-ci-service

func (*ServicesService) SetExternalWikiService added in v0.39.1

func (s *ServicesService) SetExternalWikiService(pid interface{}, opt *SetExternalWikiServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetExternalWikiService sets External Wiki service for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#createedit-external-wiki-service

func (*ServicesService) SetGitLabCIService

func (s *ServicesService) SetGitLabCIService(pid interface{}, opt *SetGitLabCIServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetGitLabCIService sets GitLab CI service for a project.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#edit-gitlab-ci-service

func (*ServicesService) SetGithubService added in v0.39.1

func (s *ServicesService) SetGithubService(pid interface{}, opt *SetGithubServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetGithubService sets Github service for a project

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#createedit-github-service

func (*ServicesService) SetHipChatService

func (s *ServicesService) SetHipChatService(pid interface{}, opt *SetHipChatServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetHipChatService sets HipChat service for a project

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#edit-hipchat-service

func (*ServicesService) SetJenkinsCIService added in v0.7.5

func (s *ServicesService) SetJenkinsCIService(pid interface{}, opt *SetJenkinsCIServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetJenkinsCIService sets Jenkins service for a project

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#create-edit-jenkins-ci-service

func (*ServicesService) SetJiraService added in v0.7.0

func (s *ServicesService) SetJiraService(pid interface{}, opt *SetJiraServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetJiraService sets Jira service for a project

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#edit-jira-service

func (*ServicesService) SetMicrosoftTeamsService added in v0.11.0

func (s *ServicesService) SetMicrosoftTeamsService(pid interface{}, opt *SetMicrosoftTeamsServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetMicrosoftTeamsService sets Microsoft Teams service for a project

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#create-edit-microsoft-teams-service

func (*ServicesService) SetPipelinesEmailService added in v0.39.1

func (s *ServicesService) SetPipelinesEmailService(pid interface{}, opt *SetPipelinesEmailServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetPipelinesEmailService sets Pipelines Email service for a project.

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#pipeline-emails

func (*ServicesService) SetSlackService

func (s *ServicesService) SetSlackService(pid interface{}, opt *SetSlackServiceOptions, options ...RequestOptionFunc) (*Response, error)

SetSlackService sets Slack service for a project

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#edit-slack-service

type SetCommitStatusOptions

type SetCommitStatusOptions struct {
	State       BuildStateValue `url:"state" json:"state"`
	Ref         *string         `url:"ref,omitempty" json:"ref,omitempty"`
	Name        *string         `url:"name,omitempty" json:"name,omitempty"`
	Context     *string         `url:"context,omitempty" json:"context,omitempty"`
	TargetURL   *string         `url:"target_url,omitempty" json:"target_url,omitempty"`
	Description *string         `url:"description,omitempty" json:"description,omitempty"`
	Coverage    *float64        `url:"coverage,omitempty" json:"coverage,omitempty"`
	PipelineID  *int            `url:"pipeline_id,omitempty" json:"pipeline_id,omitempty"`
}

SetCommitStatusOptions represents the available SetCommitStatus() options.

GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#post-the-status-to-commit

type SetCustomIssueTrackerServiceOptions added in v0.39.1

type SetCustomIssueTrackerServiceOptions struct {
	NewIssueURL *string `url:"new_issue_url,omitempty" json:"new_issue_url,omitempty"`
	IssuesURL   *string `url:"issues_url,omitempty" json:"issues_url,omitempty"`
	ProjectURL  *string `url:"project_url,omitempty" json:"project_url,omitempty"`
	Description *string `url:"description,omitempty" json:"description,omitempty"`
	Title       *string `url:"title,omitempty" json:"title,omitempty"`
	PushEvents  *bool   `url:"push_events,omitempty" json:"push_events,omitempty"`
}

SetCustomIssueTrackerServiceOptions represents the available SetCustomIssueTrackerService() options.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#createedit-custom-issue-tracker-service

type SetDroneCIServiceOptions

type SetDroneCIServiceOptions struct {
	Token                 *string `url:"token" json:"token" `
	DroneURL              *string `url:"drone_url" json:"drone_url"`
	EnableSSLVerification *bool   `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
}

SetDroneCIServiceOptions represents the available SetDroneCIService() options.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#createedit-drone-ci-service

type SetExternalWikiServiceOptions added in v0.39.1

type SetExternalWikiServiceOptions struct {
	ExternalWikiURL *string `url:"external_wiki_url,omitempty" json:"external_wiki_url,omitempty"`
}

SetExternalWikiServiceOptions represents the available SetExternalWikiService() options.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#createedit-external-wiki-service

type SetGitLabCIServiceOptions

type SetGitLabCIServiceOptions struct {
	Token      *string `url:"token,omitempty" json:"token,omitempty"`
	ProjectURL *string `url:"project_url,omitempty" json:"project_url,omitempty"`
}

SetGitLabCIServiceOptions represents the available SetGitLabCIService() options.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#edit-gitlab-ci-service

type SetGithubServiceOptions added in v0.39.1

type SetGithubServiceOptions struct {
	Token         *string `url:"token,omitempty" json:"token,omitempty"`
	RepositoryURL *string `url:"repository_url,omitempty" json:"repository_url,omitempty"`
	StaticContext *bool   `url:"static_context,omitempty" json:"static_context,omitempty"`
}

SetGithubServiceOptions represents the available SetGithubService() options.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#createedit-github-service

type SetHipChatServiceOptions

type SetHipChatServiceOptions struct {
	Token *string `url:"token,omitempty" json:"token,omitempty" `
	Room  *string `url:"room,omitempty" json:"room,omitempty"`
}

SetHipChatServiceOptions represents the available SetHipChatService() options.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#edit-hipchat-service

type SetJenkinsCIServiceOptions added in v0.7.5

type SetJenkinsCIServiceOptions struct {
	URL         *string `url:"jenkins_url,omitempty" json:"jenkins_url,omitempty"`
	ProjectName *string `url:"project_name,omitempty" json:"project_name,omitempty"`
	Username    *string `url:"username,omitempty" json:"username,omitempty"`
	Password    *string `url:"password,omitempty" json:"password,omitempty"`
}

SetJenkinsCIServiceOptions represents the available SetJenkinsCIService() options.

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#jenkins-ci

type SetJiraServiceOptions added in v0.7.0

type SetJiraServiceOptions struct {
	URL                   *string `url:"url,omitempty" json:"url,omitempty"`
	APIURL                *string `url:"api_url,omitempty" json:"api_url,omitempty"`
	ProjectKey            *string `url:"project_key,omitempty" json:"project_key,omitempty" `
	Username              *string `url:"username,omitempty" json:"username,omitempty" `
	Password              *string `url:"password,omitempty" json:"password,omitempty" `
	Active                *bool   `url:"active,omitempty" json:"active,omitempty"`
	JiraIssueTransitionID *string `url:"jira_issue_transition_id,omitempty" json:"jira_issue_transition_id,omitempty"`
	CommitEvents          *bool   `url:"commit_events,omitempty" json:"commit_events,omitempty"`
	MergeRequestsEvents   *bool   `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
	CommentOnEventEnabled *bool   `url:"comment_on_event_enabled,omitempty" json:"comment_on_event_enabled,omitempty"`
}

SetJiraServiceOptions represents the available SetJiraService() options.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#edit-jira-service

type SetMicrosoftTeamsServiceOptions added in v0.11.0

type SetMicrosoftTeamsServiceOptions struct {
	WebHook                   *string `url:"webhook,omitempty" json:"webhook,omitempty"`
	NotifyOnlyBrokenPipelines *bool   `url:"notify_only_broken_pipelines" json:"notify_only_broken_pipelines"`
	BranchesToBeNotified      *string `url:"branches_to_be_notified,omitempty" json:"branches_to_be_notified,omitempty"`
	PushEvents                *bool   `url:"push_events,omitempty" json:"push_events,omitempty"`
	IssuesEvents              *bool   `url:"issues_events,omitempty" json:"issues_events,omitempty"`
	ConfidentialIssuesEvents  *bool   `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"`
	MergeRequestsEvents       *bool   `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
	TagPushEvents             *bool   `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
	NoteEvents                *bool   `url:"note_events,omitempty" json:"note_events,omitempty"`
	ConfidentialNoteEvents    *bool   `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"`
	PipelineEvents            *bool   `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"`
	WikiPageEvents            *bool   `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
}

SetMicrosoftTeamsServiceOptions represents the available SetMicrosoftTeamsService() options.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#create-edit-microsoft-teams-service

type SetPipelinesEmailServiceOptions added in v0.39.1

type SetPipelinesEmailServiceOptions struct {
	Recipients                *string `url:"recipients,omitempty" json:"recipients,omitempty"`
	NotifyOnlyBrokenPipelines *bool   `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"`
	NotifyOnlyDefaultBranch   *bool   `url:"notify_only_default_branch,omitempty" json:"notify_only_default_branch,omitempty"`
	AddPusher                 *bool   `url:"add_pusher,omitempty" json:"add_pusher,omitempty"`
	BranchesToBeNotified      *string `url:"branches_to_be_notified,omitempty" json:"branches_to_be_notified,omitempty"`
	PipelineEvents            *bool   `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"`
}

SetPipelinesEmailServiceOptions represents the available SetPipelinesEmailService() options.

GitLab API docs: https://docs.gitlab.com/ee/api/services.html#pipeline-emails

type SetSlackServiceOptions

type SetSlackServiceOptions struct {
	WebHook                   *string `url:"webhook,omitempty" json:"webhook,omitempty"`
	Username                  *string `url:"username,omitempty" json:"username,omitempty"`
	Channel                   *string `url:"channel,omitempty" json:"channel,omitempty"`
	NotifyOnlyBrokenPipelines *bool   `url:"notify_only_broken_pipelines,omitempty" json:"notify_only_broken_pipelines,omitempty"`
	NotifyOnlyDefaultBranch   *bool   `url:"notify_only_default_branch,omitempty" json:"notify_only_default_branch,omitempty"`
	BranchesToBeNotified      *string `url:"branches_to_be_notified,omitempty" json:"branches_to_be_notified,omitempty"`
	ConfidentialIssueChannel  *string `url:"confidential_issue_channel,omitempty" json:"confidential_issue_channel,omitempty"`
	ConfidentialIssuesEvents  *bool   `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"`
	// TODO: Currently, GitLab ignores this option (not implemented yet?), so
	// there is no way to set it. Uncomment when this is fixed.
	// See: https://gitlab.com/gitlab-org/gitlab-ce/issues/49730
	//ConfidentialNoteChannel   *string `json:"confidential_note_channel,omitempty"`
	ConfidentialNoteEvents *bool   `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"`
	DeploymentChannel      *string `url:"deployment_channel,omitempty" json:"deployment_channel,omitempty"`
	DeploymentEvents       *bool   `url:"deployment_events,omitempty" json:"deployment_events,omitempty"`
	IssueChannel           *string `url:"issue_channel,omitempty" json:"issue_channel,omitempty"`
	IssuesEvents           *bool   `url:"issues_events,omitempty" json:"issues_events,omitempty"`
	MergeRequestChannel    *string `url:"merge_request_channel,omitempty" json:"merge_request_channel,omitempty"`
	MergeRequestsEvents    *bool   `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
	TagPushChannel         *string `url:"tag_push_channel,omitempty" json:"tag_push_channel,omitempty"`
	TagPushEvents          *bool   `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
	NoteChannel            *string `url:"note_channel,omitempty" json:"note_channel,omitempty"`
	NoteEvents             *bool   `url:"note_events,omitempty" json:"note_events,omitempty"`
	PipelineChannel        *string `url:"pipeline_channel,omitempty" json:"pipeline_channel,omitempty"`
	PipelineEvents         *bool   `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"`
	PushChannel            *string `url:"push_channel,omitempty" json:"push_channel,omitempty"`
	PushEvents             *bool   `url:"push_events,omitempty" json:"push_events,omitempty"`
	WikiPageChannel        *string `url:"wiki_page_channel,omitempty" json:"wiki_page_channel,omitempty"`
	WikiPageEvents         *bool   `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
}

SetSlackServiceOptions represents the available SetSlackService() options.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#edit-slack-service

type SetTimeEstimateOptions added in v0.4.0

type SetTimeEstimateOptions struct {
	Duration *string `url:"duration,omitempty" json:"duration,omitempty"`
}

SetTimeEstimateOptions represents the available SetTimeEstimate() options.

GitLab docs: https://docs.gitlab.com/ce/workflow/time_tracking.html

type Settings

type Settings struct {
	ID                                        int               `json:"id"`
	CreatedAt                                 *time.Time        `json:"created_at"`
	UpdatedAt                                 *time.Time        `json:"updated_at"`
	AdminNotificationEmail                    string            `json:"admin_notification_email"`
	AfterSignOutPath                          string            `json:"after_sign_out_path"`
	AfterSignUpText                           string            `json:"after_sign_up_text"`
	AkismetAPIKey                             string            `json:"akismet_api_key"`
	AkismetEnabled                            bool              `json:"akismet_enabled"`
	AllowGroupOwnersToManageLDAP              bool              `json:"allow_group_owners_to_manage_ldap"`
	AllowLocalRequestsFromHooksAndServices    bool              `json:"allow_local_requests_from_hooks_and_services"`
	AllowLocalRequestsFromSystemHooks         bool              `json:"allow_local_requests_from_system_hooks"`
	AllowLocalRequestsFromWebHooksAndServices bool              `json:"allow_local_requests_from_web_hooks_and_services"`
	ArchiveBuildsInHumanReadable              string            `json:"archive_builds_in_human_readable"`
	AssetProxyEnabled                         bool              `json:"asset_proxy_enabled"`
	AssetProxySecretKey                       string            `json:"asset_proxy_secret_key"`
	AssetProxyURL                             string            `json:"asset_proxy_url"`
	AssetProxyWhitelist                       []string          `json:"asset_proxy_whitelist"`
	AuthorizedKeysEnabled                     bool              `json:"authorized_keys_enabled_enabled"`
	AutoDevOpsDomain                          string            `json:"auto_devops_domain"`
	AutoDevOpsEnabled                         bool              `json:"auto_devops_enabled"`
	CheckNamespacePlan                        bool              `json:"check_namespace_plan"`
	CommitEmailHostname                       string            `json:"commit_email_hostname"`
	ContainerRegistryTokenExpireDelay         int               `json:"container_registry_token_expire_delay"`
	DefaultArtifactsExpireIn                  string            `json:"default_artifacts_expire_in"`
	DefaultBranchProtection                   int               `json:"default_branch_protection"`
	DefaultGroupVisibility                    VisibilityValue   `json:"default_group_visibility"`
	DefaultProjectCreation                    int               `json:"default_project_creation"`
	DefaultProjectsLimit                      int               `json:"default_projects_limit"`
	DefaultProjectVisibility                  VisibilityValue   `json:"default_project_visibility"`
	DefaultSnippetVisibility                  VisibilityValue   `json:"default_snippet_visibility"`
	DiffMaxPatchBytes                         int               `json:"diff_max_patch_bytes"`
	DisabledOauthSignInSources                []string          `json:"disabled_oauth_sign_in_sources"`
	DNSRebindingProtectionEnabled             bool              `json:"dns_rebinding_protection_enabled"`
	DomainBlacklist                           []string          `json:"domain_blacklist"`
	DomainBlacklistEnabled                    bool              `json:"domain_blacklist_enabled"`
	DomainWhitelist                           []string          `json:"domain_whitelist"`
	DSAKeyRestriction                         int               `json:"dsa_key_restriction"`
	ECDSAKeyRestriction                       int               `json:"ecdsa_key_restriction"`
	Ed25519KeyRestriction                     int               `json:"ed25519_key_restriction"`
	ElasticsearchAWSAccessKey                 string            `json:"elasticsearch_aws_access_key"`
	ElasticsearchAWS                          bool              `json:"elasticsearch_aws"`
	ElasticsearchAWSRegion                    string            `json:"elasticsearch_aws_region"`
	ElasticsearchAWSSecretAccessKey           string            `json:"elasticsearch_aws_secret_access_key"`
	ElasticsearchIndexing                     bool              `json:"elasticsearch_indexing"`
	ElasticsearchLimitIndexing                bool              `json:"elasticsearch_limit_indexing"`
	ElasticsearchNamespaceIDs                 []int             `json:"elasticsearch_namespace_ids"`
	ElasticsearchProjectIDs                   []int             `json:"elasticsearch_project_ids"`
	ElasticsearchSearch                       bool              `json:"elasticsearch_search"`
	ElasticsearchURL                          []string          `json:"elasticsearch_url"`
	EmailAdditionalText                       string            `json:"email_additional_text"`
	EmailAuthorInBody                         bool              `json:"email_author_in_body"`
	EnabledGitAccessProtocol                  string            `json:"enabled_git_access_protocol"`
	EnforceTerms                              bool              `json:"enforce_terms"`
	ExternalAuthClientCert                    string            `json:"external_auth_client_cert"`
	ExternalAuthClientKeyPass                 string            `json:"external_auth_client_key_pass"`
	ExternalAuthClientKey                     string            `json:"external_auth_client_key"`
	ExternalAuthorizationServiceDefaultLabel  string            `json:"external_authorization_service_default_label"`
	ExternalAuthorizationServiceEnabled       bool              `json:"external_authorization_service_enabled"`
	ExternalAuthorizationServiceTimeout       float64           `json:"external_authorization_service_timeout"`
	ExternalAuthorizationServiceURL           string            `json:"external_authorization_service_url"`
	FileTemplateProjectID                     int               `json:"file_template_project_id"`
	FirstDayOfWeek                            int               `json:"first_day_of_week"`
	GeoNodeAllowedIPs                         string            `json:"geo_node_allowed_ips"`
	GeoStatusTimeout                          int               `json:"geo_status_timeout"`
	GitalyTimeoutDefault                      int               `json:"gitaly_timeout_default"`
	GitalyTimeoutFast                         int               `json:"gitaly_timeout_fast"`
	GitalyTimeoutMedium                       int               `json:"gitaly_timeout_medium"`
	GrafanaEnabled                            bool              `json:"grafana_enabled"`
	GrafanaURL                                string            `json:"grafana_url"`
	GravatarEnabled                           bool              `json:"gravatar_enabled"`
	HashedStorageEnabled                      bool              `json:"hashed_storage_enabled"`
	HelpPageHideCommercialContent             bool              `json:"help_page_hide_commercial_content"`
	HelpPageSupportURL                        string            `json:"help_page_support_url"`
	HelpPageText                              string            `json:"help_page_text"`
	HelpText                                  string            `json:"help_text"`
	HideThirdPartyOffers                      bool              `json:"hide_third_party_offers"`
	HomePageURL                               string            `json:"home_page_url"`
	HousekeepingBitmapsEnabled                bool              `json:"housekeeping_bitmaps_enabled"`
	HousekeepingEnabled                       bool              `json:"housekeeping_enabled"`
	HousekeepingFullRepackPeriod              int               `json:"housekeeping_full_repack_period"`
	HousekeepingGcPeriod                      int               `json:"housekeeping_gc_period"`
	HousekeepingIncrementalRepackPeriod       int               `json:"housekeeping_incremental_repack_period"`
	HTMLEmailsEnabled                         bool              `json:"html_emails_enabled"`
	ImportSources                             []string          `json:"import_sources"`
	InstanceStatisticsVisibilityPrivate       bool              `json:"instance_statistics_visibility_private"`
	LocalMarkdownVersion                      int               `json:"local_markdown_version"`
	MaxArtifactsSize                          int               `json:"max_artifacts_size"`
	MaxAttachmentSize                         int               `json:"max_attachment_size"`
	MaxPagesSize                              int               `json:"max_pages_size"`
	MetricsEnabled                            bool              `json:"metrics_enabled"`
	MetricsHost                               string            `json:"metrics_host"`
	MetricsMethodCallThreshold                int               `json:"metrics_method_call_threshold"`
	MetricsPacketSize                         int               `json:"metrics_packet_size"`
	MetricsPoolSize                           int               `json:"metrics_pool_size"`
	MetricsPort                               int               `json:"metrics_port"`
	MetricsSampleInterval                     int               `json:"metrics_sample_interval"`
	MetricsTimeout                            int               `json:"metrics_timeout"`
	MirrorAvailable                           bool              `json:"mirror_available"`
	MirrorCapacityThreshold                   int               `json:"mirror_capacity_threshold"`
	MirrorMaxCapacity                         int               `json:"mirror_max_capacity"`
	MirrorMaxDelay                            int               `json:"mirror_max_delay"`
	OutboundLocalRequestsWhitelist            []string          `json:"outbound_local_requests_whitelist"`
	PagesDomainVerificationEnabled            bool              `json:"pages_domain_verification_enabled"`
	PasswordAuthenticationEnabledForGit       bool              `json:"password_authentication_enabled_for_git"`
	PasswordAuthenticationEnabledForWeb       bool              `json:"password_authentication_enabled_for_web"`
	PerformanceBarAllowedGroupID              string            `json:"performance_bar_allowed_group_id"`
	PerformanceBarAllowedGroupPath            string            `json:"performance_bar_allowed_group_path"`
	PerformanceBarEnabled                     bool              `json:"performance_bar_enabled"`
	PlantumlEnabled                           bool              `json:"plantuml_enabled"`
	PlantumlURL                               string            `json:"plantuml_url"`
	PollingIntervalMultiplier                 float64           `json:"polling_interval_multiplier,string"`
	ProjectExportEnabled                      bool              `json:"project_export_enabled"`
	PrometheusMetricsEnabled                  bool              `json:"prometheus_metrics_enabled"`
	ProtectedCIVariables                      bool              `json:"protected_ci_variables"`
	PseudonymizerEnabled                      bool              `json:"psedonymizer_enabled"`
	PushEventHooksLimit                       int               `json:"push_event_hooks_limit"`
	PushEventActivitiesLimit                  int               `json:"push_event_activities_limit"`
	RecaptchaEnabled                          bool              `json:"recaptcha_enabled"`
	RecaptchaPrivateKey                       string            `json:"recaptcha_private_key"`
	RecaptchaSiteKey                          string            `json:"recaptcha_site_key"`
	ReceiveMaxInputSize                       int               `json:"receive_max_input_size"`
	RepositoryChecksEnabled                   bool              `json:"repository_checks_enabled"`
	RepositorySizeLimit                       int               `json:"repository_size_limit"`
	RepositoryStorages                        []string          `json:"repository_storages"`
	RequireTwoFactorAuthentication            bool              `json:"require_two_factor_authentication"`
	RestrictedVisibilityLevels                []VisibilityValue `json:"restricted_visibility_levels"`
	RsaKeyRestriction                         int               `json:"rsa_key_restriction"`
	SendUserConfirmationEmail                 bool              `json:"send_user_confirmation_email"`
	SessionExpireDelay                        int               `json:"session_expire_delay"`
	SharedRunnersEnabled                      bool              `json:"shared_runners_enabled"`
	SharedRunnersMinutes                      int               `json:"shared_runners_minutes"`
	SharedRunnersText                         string            `json:"shared_runners_text"`
	SignInText                                string            `json:"sign_in_text"`
	SignupEnabled                             bool              `json:"signup_enabled"`
	SlackAppEnabled                           bool              `json:"slack_app_enabled"`
	SlackAppID                                string            `json:"slack_app_id"`
	SlackAppSecret                            string            `json:"slack_app_secret"`
	SlackAppVerificationToken                 string            `json:"slack_app_verification_token"`
	SnowplowCollectorHostname                 string            `json:"snowplow_collector_hostname"`
	SnowplowCookieDomain                      string            `json:"snowplow_cookie_domain"`
	SnowplowEnabled                           bool              `json:"snowplow_enabled"`
	SnowplowSiteID                            string            `json:"snowplow_site_id"`
	TerminalMaxSessionTime                    int               `json:"terminal_max_session_time"`
	Terms                                     string            `json:"terms"`
	ThrottleAuthenticatedAPIEnabled           bool              `json:"throttle_authenticated_api_enabled"`
	ThrottleAuthenticatedAPIPeriodInSeconds   int               `json:"throttle_authenticated_api_period_in_seconds"`
	ThrottleAuthenticatedAPIRequestsPerPeriod int               `json:"throttle_authenticated_api_requests_per_period"`
	ThrottleAuthenticatedWebEnabled           bool              `json:"throttle_authenticated_web_enabled"`
	ThrottleAuthenticatedWebPeriodInSeconds   int               `json:"throttle_authenticated_web_period_in_seconds"`
	ThrottleAuthenticatedWebRequestsPerPeriod int               `json:"throttle_authenticated_web_requests_per_period"`
	ThrottleUnauthenticatedEnabled            bool              `json:"throttle_unauthenticated_enabled"`
	ThrottleUnauthenticatedPeriodInSeconds    int               `json:"throttle_unauthenticated_period_in_seconds"`
	ThrottleUnauthenticatedRequestsPerPeriod  int               `json:"throttle_unauthenticated_requests_per_period"`
	TimeTrackingLimitToHours                  bool              `json:"time_tracking_limit_to_hours"`
	TwoFactorGracePeriod                      int               `json:"two_factor_grace_period"`
	UniqueIPsLimitEnabled                     bool              `json:"unique_ips_limit_enabled"`
	UniqueIPsLimitPerUser                     int               `json:"unique_ips_limit_per_user"`
	UniqueIPsLimitTimeWindow                  int               `json:"unique_ips_limit_time_window"`
	UsagePingEnabled                          bool              `json:"usage_ping_enabled"`
	UserDefaultExternal                       bool              `json:"user_default_external"`
	UserDefaultInternalRegex                  string            `json:"user_default_internal_regex"`
	UserOauthApplications                     bool              `json:"user_oauth_applications"`
	UserShowAddSSHKeyMessage                  bool              `json:"user_show_add_ssh_key_message"`
	VersionCheckEnabled                       bool              `json:"version_check_enabled"`
	WebIDEClientsidePreviewEnabled            bool              `json:"web_ide_clientside_preview_enabled"`
}

Settings represents the GitLab application settings.

GitLab API docs: https://docs.gitlab.com/ce/api/settings.html

func (Settings) String

func (s Settings) String() string

type SettingsService

type SettingsService struct {
	// contains filtered or unexported fields
}

SettingsService handles communication with the application SettingsService related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/settings.html

func (*SettingsService) GetSettings

func (s *SettingsService) GetSettings(options ...RequestOptionFunc) (*Settings, *Response, error)

GetSettings gets the current application settings.

GitLab API docs: https://docs.gitlab.com/ce/api/settings.html#get-current-application.settings

func (*SettingsService) UpdateSettings

func (s *SettingsService) UpdateSettings(opt *UpdateSettingsOptions, options ...RequestOptionFunc) (*Settings, *Response, error)

UpdateSettings updates the application settings.

GitLab API docs: https://docs.gitlab.com/ce/api/settings.html#change-application.settings

type ShareWithGroupOptions added in v0.6.0

type ShareWithGroupOptions struct {
	GroupID     *int              `url:"group_id" json:"group_id"`
	GroupAccess *AccessLevelValue `url:"group_access" json:"group_access"`
	ExpiresAt   *string           `url:"expires_at" json:"expires_at"`
}

ShareWithGroupOptions represents options to share project with groups

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#share-project-with-group

type SidekiqService added in v0.8.1

type SidekiqService struct {
	// contains filtered or unexported fields
}

SidekiqService handles communication with the sidekiq service

GitLab API docs: https://docs.gitlab.com/ce/api/sidekiq_metrics.html

func (*SidekiqService) GetCompoundMetrics added in v0.8.1

func (s *SidekiqService) GetCompoundMetrics(options ...RequestOptionFunc) (*CompoundMetrics, *Response, error)

GetCompoundMetrics lists all the currently available information about Sidekiq. Get a compound response of all the previously mentioned metrics

GitLab API docs: https://docs.gitlab.com/ce/api/sidekiq_metrics.html#get-the-current-job-statistics

func (*SidekiqService) GetJobStats added in v0.8.1

func (s *SidekiqService) GetJobStats(options ...RequestOptionFunc) (*JobStats, *Response, error)

GetJobStats list information about the jobs that Sidekiq has performed.

GitLab API docs: https://docs.gitlab.com/ce/api/sidekiq_metrics.html#get-the-current-job-statistics

func (*SidekiqService) GetProcessMetrics added in v0.8.1

func (s *SidekiqService) GetProcessMetrics(options ...RequestOptionFunc) (*ProcessMetrics, *Response, error)

GetProcessMetrics lists information about all the Sidekiq workers registered to process your queues.

GitLab API docs: https://docs.gitlab.com/ce/api/sidekiq_metrics.html#get-the-current-process-metrics

func (*SidekiqService) GetQueueMetrics added in v0.8.1

func (s *SidekiqService) GetQueueMetrics(options ...RequestOptionFunc) (*QueueMetrics, *Response, error)

GetQueueMetrics lists information about all the registered queues, their backlog and their latency.

GitLab API docs: https://docs.gitlab.com/ce/api/sidekiq_metrics.html#get-the-current-queue-metrics

type SlackService added in v0.6.2

type SlackService struct {
	Service
	Properties *SlackServiceProperties `json:"properties"`
}

SlackService represents Slack service settings.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#slack

type SlackServiceProperties added in v0.6.2

type SlackServiceProperties struct {
	WebHook                   string    `json:"webhook,omitempty"`
	Username                  string    `json:"username,omitempty"`
	Channel                   string    `json:"channel,omitempty"`
	NotifyOnlyBrokenPipelines BoolValue `json:"notify_only_broken_pipelines,omitempty"`
	NotifyOnlyDefaultBranch   BoolValue `json:"notify_only_default_branch,omitempty"`
	BranchesToBeNotified      string    `json:"branches_to_be_notified,omitempty"`
	ConfidentialIssueChannel  string    `json:"confidential_issue_channel,omitempty"`
	ConfidentialNoteChannel   string    `json:"confidential_note_channel,omitempty"`
	DeploymentChannel         string    `json:"deployment_channel,omitempty"`
	IssueChannel              string    `json:"issue_channel,omitempty"`
	MergeRequestChannel       string    `json:"merge_request_channel,omitempty"`
	NoteChannel               string    `json:"note_channel,omitempty"`
	TagPushChannel            string    `json:"tag_push_channel,omitempty"`
	PipelineChannel           string    `json:"pipeline_channel,omitempty"`
	PushChannel               string    `json:"push_channel,omitempty"`
	WikiPageChannel           string    `json:"wiki_page_channel,omitempty"`
}

SlackServiceProperties represents Slack specific properties.

GitLab API docs: https://docs.gitlab.com/ce/api/services.html#slack

type Snippet

type Snippet struct {
	ID          int    `json:"id"`
	Title       string `json:"title"`
	FileName    string `json:"file_name"`
	Description string `json:"description"`
	Author      struct {
		ID        int        `json:"id"`
		Username  string     `json:"username"`
		Email     string     `json:"email"`
		Name      string     `json:"name"`
		State     string     `json:"state"`
		CreatedAt *time.Time `json:"created_at"`
	} `json:"author"`
	UpdatedAt *time.Time `json:"updated_at"`
	CreatedAt *time.Time `json:"created_at"`
	WebURL    string     `json:"web_url"`
	RawURL    string     `json:"raw_url"`
}

Snippet represents a GitLab snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html

func (Snippet) String

func (s Snippet) String() string

type SnippetCommentEvent added in v0.3.1

type SnippetCommentEvent struct {
	ObjectKind string `json:"object_kind"`
	User       *User  `json:"user"`
	ProjectID  int    `json:"project_id"`
	Project    struct {
		Name              string          `json:"name"`
		Description       string          `json:"description"`
		AvatarURL         string          `json:"avatar_url"`
		GitSSHURL         string          `json:"git_ssh_url"`
		GitHTTPURL        string          `json:"git_http_url"`
		Namespace         string          `json:"namespace"`
		PathWithNamespace string          `json:"path_with_namespace"`
		DefaultBranch     string          `json:"default_branch"`
		Homepage          string          `json:"homepage"`
		URL               string          `json:"url"`
		SSHURL            string          `json:"ssh_url"`
		HTTPURL           string          `json:"http_url"`
		WebURL            string          `json:"web_url"`
		Visibility        VisibilityValue `json:"visibility"`
	} `json:"project"`
	Repository       *Repository `json:"repository"`
	ObjectAttributes struct {
		ID           int    `json:"id"`
		Note         string `json:"note"`
		NoteableType string `json:"noteable_type"`
		AuthorID     int    `json:"author_id"`
		CreatedAt    string `json:"created_at"`
		UpdatedAt    string `json:"updated_at"`
		ProjectID    int    `json:"project_id"`
		Attachment   string `json:"attachment"`
		LineCode     string `json:"line_code"`
		CommitID     string `json:"commit_id"`
		NoteableID   int    `json:"noteable_id"`
		System       bool   `json:"system"`
		StDiff       *Diff  `json:"st_diff"`
		URL          string `json:"url"`
	} `json:"object_attributes"`
	Snippet *Snippet `json:"snippet"`
}

SnippetCommentEvent represents a comment on a snippet event.

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#comment-on-code-snippet

type SnippetsService added in v0.7.2

type SnippetsService struct {
	// contains filtered or unexported fields
}

SnippetsService handles communication with the snippets related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html

func (*SnippetsService) CreateSnippet added in v0.7.2

func (s *SnippetsService) CreateSnippet(opt *CreateSnippetOptions, options ...RequestOptionFunc) (*Snippet, *Response, error)

CreateSnippet creates a new snippet. The user must have permission to create new snippets.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#create-new-snippet

func (*SnippetsService) DeleteSnippet added in v0.7.2

func (s *SnippetsService) DeleteSnippet(snippet int, options ...RequestOptionFunc) (*Response, error)

DeleteSnippet deletes an existing snippet. This is an idempotent function and deleting a non-existent snippet still returns a 200 OK status code.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#delete-snippet

func (*SnippetsService) ExploreSnippets added in v0.7.5

func (s *SnippetsService) ExploreSnippets(opt *ExploreSnippetsOptions, options ...RequestOptionFunc) ([]*Snippet, *Response, error)

ExploreSnippets gets the list of public snippets.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#explore-all-public-snippets

func (*SnippetsService) GetSnippet added in v0.7.2

func (s *SnippetsService) GetSnippet(snippet int, options ...RequestOptionFunc) (*Snippet, *Response, error)

GetSnippet gets a single snippet

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#single-snippet

func (*SnippetsService) ListSnippets added in v0.7.2

func (s *SnippetsService) ListSnippets(opt *ListSnippetsOptions, options ...RequestOptionFunc) ([]*Snippet, *Response, error)

ListSnippets gets a list of snippets.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#list-snippets

func (*SnippetsService) SnippetContent added in v0.7.2

func (s *SnippetsService) SnippetContent(snippet int, options ...RequestOptionFunc) ([]byte, *Response, error)

SnippetContent returns the raw snippet as plain text.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#snippet-content

func (*SnippetsService) UpdateSnippet added in v0.7.2

func (s *SnippetsService) UpdateSnippet(snippet int, opt *UpdateSnippetOptions, options ...RequestOptionFunc) (*Snippet, *Response, error)

UpdateSnippet updates an existing snippet. The user must have permission to change an existing snippet.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#update-snippet

type StorageStatistics added in v0.4.1

type StorageStatistics struct {
	StorageSize      int64 `json:"storage_size"`
	RepositorySize   int64 `json:"repository_size"`
	LfsObjectsSize   int64 `json:"lfs_objects_size"`
	JobArtifactsSize int64 `json:"job_artifacts_size"`
}

StorageStatistics represents a statistics record for a group or project.

type SubGroupCreationLevelValue added in v0.39.1

type SubGroupCreationLevelValue string

SubGroupCreationLevelValue represents a sub group creation level within GitLab.

GitLab API docs: https://docs.gitlab.com/ce/api/

const (
	OwnerSubGroupCreationLevelValue      SubGroupCreationLevelValue = "owner"
	MaintainerSubGroupCreationLevelValue SubGroupCreationLevelValue = "maintainer"
)

List of available sub group creation levels.

GitLab API docs: https://docs.gitlab.com/ce/api/

func SubGroupCreationLevel added in v0.39.1

SubGroupCreationLevel is a helper routine that allocates a new SubGroupCreationLevelValue to store v and returns a pointer to it.

type SystemHooksService

type SystemHooksService struct {
	// contains filtered or unexported fields
}

SystemHooksService handles communication with the system hooks related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html

func (*SystemHooksService) AddHook

func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...RequestOptionFunc) (*Hook, *Response, error)

AddHook adds a new system hook hook.

GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook

func (*SystemHooksService) DeleteHook

func (s *SystemHooksService) DeleteHook(hook int, options ...RequestOptionFunc) (*Response, error)

DeleteHook deletes a system hook. This is an idempotent API function and returns 200 OK even if the hook is not available. If the hook is deleted it is also returned as JSON.

GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html#delete-system-hook

func (*SystemHooksService) ListHooks

func (s *SystemHooksService) ListHooks(options ...RequestOptionFunc) ([]*Hook, *Response, error)

ListHooks gets a list of system hooks.

GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html#list-system-hooks

func (*SystemHooksService) TestHook

func (s *SystemHooksService) TestHook(hook int, options ...RequestOptionFunc) (*HookEvent, *Response, error)

TestHook tests a system hook.

GitLab API docs: https://docs.gitlab.com/ce/api/system_hooks.html#test-system-hook

type Tag

type Tag struct {
	Commit  *Commit      `json:"commit"`
	Release *ReleaseNote `json:"release"`
	Name    string       `json:"name"`
	Message string       `json:"message"`
}

Tag represents a GitLab tag.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html

func (Tag) String

func (t Tag) String() string

type TagAccessDescription added in v0.39.1

type TagAccessDescription struct {
	AccessLevel            AccessLevelValue `json:"access_level"`
	AccessLevelDescription string           `json:"access_level_description"`
}

TagAccessDescription reperesents the access decription for a protected tag.

GitLab API docs: https://docs.gitlab.com/ee/api/protected_tags.html

type TagEvent added in v0.3.1

type TagEvent struct {
	ObjectKind  string `json:"object_kind"`
	Before      string `json:"before"`
	After       string `json:"after"`
	Ref         string `json:"ref"`
	CheckoutSHA string `json:"checkout_sha"`
	UserID      int    `json:"user_id"`
	UserName    string `json:"user_name"`
	UserAvatar  string `json:"user_avatar"`
	UserEmail   string `json:"user_email"`
	ProjectID   int    `json:"project_id"`
	Message     string `json:"message"`
	Project     struct {
		Name              string          `json:"name"`
		Description       string          `json:"description"`
		AvatarURL         string          `json:"avatar_url"`
		GitSSHURL         string          `json:"git_ssh_url"`
		GitHTTPURL        string          `json:"git_http_url"`
		Namespace         string          `json:"namespace"`
		PathWithNamespace string          `json:"path_with_namespace"`
		DefaultBranch     string          `json:"default_branch"`
		Homepage          string          `json:"homepage"`
		URL               string          `json:"url"`
		SSHURL            string          `json:"ssh_url"`
		HTTPURL           string          `json:"http_url"`
		WebURL            string          `json:"web_url"`
		Visibility        VisibilityValue `json:"visibility"`
	} `json:"project"`
	Repository *Repository `json:"repository"`
	Commits    []*struct {
		ID        string     `json:"id"`
		Message   string     `json:"message"`
		Timestamp *time.Time `json:"timestamp"`
		URL       string     `json:"url"`
		Author    struct {
			Name  string `json:"name"`
			Email string `json:"email"`
		} `json:"author"`
		Added    []string `json:"added"`
		Modified []string `json:"modified"`
		Removed  []string `json:"removed"`
	} `json:"commits"`
	TotalCommitsCount int `json:"total_commits_count"`
}

TagEvent represents a tag event.

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#tag-events

type TagPushSystemEvent added in v0.39.1

type TagPushSystemEvent struct {
	BaseSystemEvent
}

TagPushSystemEvent represents a tag push system event.

GitLab API docs: https://docs.gitlab.com/ee/system_hooks/system_hooks.html

type TagsService added in v0.3.0

type TagsService struct {
	// contains filtered or unexported fields
}

TagsService handles communication with the tags related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html

func (*TagsService) CreateReleaseNote deprecated added in v0.39.1

func (s *TagsService) CreateReleaseNote(pid interface{}, tag string, opt *CreateReleaseNoteOptions, options ...RequestOptionFunc) (*ReleaseNote, *Response, error)

CreateReleaseNote Add release notes to the existing git tag. If there already exists a release for the given tag, status code 409 is returned.

Deprecated: This feature was deprecated in GitLab 11.7.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html#create-a-new-release

func (*TagsService) CreateTag added in v0.3.0

func (s *TagsService) CreateTag(pid interface{}, opt *CreateTagOptions, options ...RequestOptionFunc) (*Tag, *Response, error)

CreateTag creates a new tag in the repository that points to the supplied ref.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html#create-a-new-tag

func (*TagsService) DeleteTag added in v0.3.0

func (s *TagsService) DeleteTag(pid interface{}, tag string, options ...RequestOptionFunc) (*Response, error)

DeleteTag deletes a tag of a repository with given name.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html#delete-a-tag

func (*TagsService) GetTag added in v0.4.0

func (s *TagsService) GetTag(pid interface{}, tag string, options ...RequestOptionFunc) (*Tag, *Response, error)

GetTag a specific repository tag determined by its name. It returns 200 together with the tag information if the tag exists. It returns 404 if the tag does not exist.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html#get-a-single-repository-tag

func (*TagsService) ListTags added in v0.3.0

func (s *TagsService) ListTags(pid interface{}, opt *ListTagsOptions, options ...RequestOptionFunc) ([]*Tag, *Response, error)

ListTags gets a list of tags from a project, sorted by name in reverse alphabetical order.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html#list-project-repository-tags

func (*TagsService) UpdateReleaseNote deprecated added in v0.39.1

func (s *TagsService) UpdateReleaseNote(pid interface{}, tag string, opt *UpdateReleaseNoteOptions, options ...RequestOptionFunc) (*ReleaseNote, *Response, error)

UpdateReleaseNote Updates the release notes of a given release.

Deprecated: This feature was deprecated in GitLab 11.7.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html#update-a-release

type TimeStats added in v0.4.0

type TimeStats struct {
	HumanTimeEstimate   string `json:"human_time_estimate"`
	HumanTotalTimeSpent string `json:"human_total_time_spent"`
	TimeEstimate        int    `json:"time_estimate"`
	TotalTimeSpent      int    `json:"total_time_spent"`
}

TimeStats represents the time estimates and time spent for an issue.

GitLab docs: https://docs.gitlab.com/ce/workflow/time_tracking.html

func (TimeStats) String added in v0.4.0

func (t TimeStats) String() string

type Todo added in v0.6.0

type Todo struct {
	ID      int `json:"id"`
	Project struct {
		ID                int    `json:"id"`
		HTTPURLToRepo     string `json:"http_url_to_repo"`
		WebURL            string `json:"web_url"`
		Name              string `json:"name"`
		NameWithNamespace string `json:"name_with_namespace"`
		Path              string `json:"path"`
		PathWithNamespace string `json:"path_with_namespace"`
	} `json:"project"`
	Author struct {
		ID        int    `json:"id"`
		Name      string `json:"name"`
		Username  string `json:"username"`
		State     string `json:"state"`
		AvatarURL string `json:"avatar_url"`
		WebURL    string `json:"web_url"`
	} `json:"author"`
	ActionName TodoAction `json:"action_name"`
	TargetType string     `json:"target_type"`
	Target     TodoTarget `json:"target"`
	TargetURL  string     `json:"target_url"`
	Body       string     `json:"body"`
	State      string     `json:"state"`
	CreatedAt  *time.Time `json:"created_at"`
}

Todo represents a GitLab todo.

GitLab API docs: https://docs.gitlab.com/ce/api/todos.html

func (Todo) String added in v0.6.0

func (t Todo) String() string

type TodoAction added in v0.6.0

type TodoAction string

TodoAction represents the available actions that can be performed on a todo.

GitLab API docs: https://docs.gitlab.com/ce/api/todos.html

const (
	TodoAssigned          TodoAction = "assigned"
	TodoMentioned         TodoAction = "mentioned"
	TodoBuildFailed       TodoAction = "build_failed"
	TodoMarked            TodoAction = "marked"
	TodoApprovalRequired  TodoAction = "approval_required"
	TodoDirectlyAddressed TodoAction = "directly_addressed"
)

The available todo actions.

type TodoTarget added in v0.6.0

type TodoTarget struct {
	// TODO: replace both Assignee and Author structs with v4 User struct
	Assignee struct {
		Name      string `json:"name"`
		Username  string `json:"username"`
		ID        int    `json:"id"`
		State     string `json:"state"`
		AvatarURL string `json:"avatar_url"`
		WebURL    string `json:"web_url"`
	} `json:"assignee"`
	Author struct {
		Name      string `json:"name"`
		Username  string `json:"username"`
		ID        int    `json:"id"`
		State     string `json:"state"`
		AvatarURL string `json:"avatar_url"`
		WebURL    string `json:"web_url"`
	} `json:"author"`
	CreatedAt      *time.Time `json:"created_at"`
	Description    string     `json:"description"`
	Downvotes      int        `json:"downvotes"`
	ID             int        `json:"id"`
	IID            int        `json:"iid"`
	Labels         []string   `json:"labels"`
	Milestone      Milestone  `json:"milestone"`
	ProjectID      int        `json:"project_id"`
	State          string     `json:"state"`
	Subscribed     bool       `json:"subscribed"`
	Title          string     `json:"title"`
	UpdatedAt      *time.Time `json:"updated_at"`
	Upvotes        int        `json:"upvotes"`
	UserNotesCount int        `json:"user_notes_count"`
	WebURL         string     `json:"web_url"`

	// Only available for type Issue
	Confidential bool   `json:"confidential"`
	DueDate      string `json:"due_date"`
	Weight       int    `json:"weight"`

	// Only available for type MergeRequest
	ApprovalsBeforeMerge      int    `json:"approvals_before_merge"`
	ForceRemoveSourceBranch   bool   `json:"force_remove_source_branch"`
	MergeCommitSHA            string `json:"merge_commit_sha"`
	MergeWhenPipelineSucceeds bool   `json:"merge_when_pipeline_succeeds"`
	MergeStatus               string `json:"merge_status"`
	SHA                       string `json:"sha"`
	ShouldRemoveSourceBranch  bool   `json:"should_remove_source_branch"`
	SourceBranch              string `json:"source_branch"`
	SourceProjectID           int    `json:"source_project_id"`
	Squash                    bool   `json:"squash"`
	TargetBranch              string `json:"target_branch"`
	TargetProjectID           int    `json:"target_project_id"`
	WorkInProgress            bool   `json:"work_in_progress"`
}

TodoTarget represents a todo target of type Issue or MergeRequest

type TodosService added in v0.6.0

type TodosService struct {
	// contains filtered or unexported fields
}

TodosService handles communication with the todos related methods of the Gitlab API.

GitLab API docs: https://docs.gitlab.com/ce/api/todos.html

func (*TodosService) ListTodos added in v0.6.0

func (s *TodosService) ListTodos(opt *ListTodosOptions, options ...RequestOptionFunc) ([]*Todo, *Response, error)

ListTodos lists all todos created by authenticated user. When no filter is applied, it returns all pending todos for the current user.

GitLab API docs: https://docs.gitlab.com/ce/api/todos.html#get-a-list-of-todos

func (*TodosService) MarkAllTodosAsDone added in v0.6.0

func (s *TodosService) MarkAllTodosAsDone(options ...RequestOptionFunc) (*Response, error)

MarkAllTodosAsDone marks all pending todos for the current user as done.

GitLab API docs: https://docs.gitlab.com/ce/api/todos.html#mark-all-todos-as-done

func (*TodosService) MarkTodoAsDone added in v0.6.0

func (s *TodosService) MarkTodoAsDone(id int, options ...RequestOptionFunc) (*Response, error)

MarkTodoAsDone marks a single pending todo given by its ID for the current user as done.

GitLab API docs: https://docs.gitlab.com/ce/api/todos.html#mark-a-todo-as-done

type TransferProjectOptions added in v0.39.1

type TransferProjectOptions struct {
	Namespace interface{} `url:"namespace,omitempty" json:"namespace,omitempty"`
}

TransferProjectOptions represents the available TransferProject() options.

GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#transfer-a-project-to-a-new-namespace

type TreeNode

type TreeNode struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Type string `json:"type"`
	Path string `json:"path"`
	Mode string `json:"mode"`
}

TreeNode represents a GitLab repository file or directory.

GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html

func (TreeNode) String

func (t TreeNode) String() string

type UpdateBroadcastMessageOptions added in v0.8.1

type UpdateBroadcastMessageOptions struct {
	Message  *string    `url:"message,omitempty" json:"message,omitempty"`
	StartsAt *time.Time `url:"starts_at,omitempty" json:"starts_at,omitempty"`
	EndsAt   *time.Time `url:"ends_at,omitempty" json:"ends_at,omitempty"`
	Color    *string    `url:"color,omitempty" json:"color,omitempty"`
	Font     *string    `url:"font,omitempty" json:"font,omitempty"`
}

UpdateBroadcastMessageOptions represents the available CreateBroadcastMessage() options.

GitLab API docs: https://docs.gitlab.com/ce/api/broadcast_messages.html#update-a-broadcast-message

type UpdateCommitDiscussionNoteOptions added in v0.11.2

type UpdateCommitDiscussionNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

UpdateCommitDiscussionNoteOptions represents the available UpdateCommitDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#modify-an-existing-commit-thread-note

type UpdateDeployKeyOptions added in v0.39.1

type UpdateDeployKeyOptions struct {
	Title   *string `url:"title,omitempty" json:"title,omitempty"`
	CanPush *bool   `url:"can_push,omitempty" json:"can_push,omitempty"`
}

UpdateDeployKeyOptions represents the available UpdateDeployKey() options.

GitLab API docs: https://docs.gitlab.com/ce/api/deploy_keys.html#update-deploy-key

type UpdateEpicDiscussionNoteOptions added in v0.11.2

type UpdateEpicDiscussionNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

UpdateEpicDiscussionNoteOptions represents the available UpdateEpicDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#modify-existing-epic-thread-note

type UpdateEpicIsssueAssignmentOptions added in v0.39.1

type UpdateEpicIsssueAssignmentOptions struct {
	*ListOptions
	MoveBeforeID *int `url:"move_before_id,omitempty" json:"move_before_id,omitempty"`
	MoveAfterID  *int `url:"move_after_id,omitempty" json:"move_after_id,omitempty"`
}

UpdateEpicIsssueAssignmentOptions describes the UpdateEpicIssueAssignment() options.

Gitlab API Docs: https://docs.gitlab.com/ee/api/epic_issues.html#update-epic---issue-association

type UpdateEpicNoteOptions added in v0.39.1

type UpdateEpicNoteOptions struct {
	Body *string `url:"body,omitempty" json:"body,omitempty"`
}

UpdateEpicNoteOptions represents the available UpdateEpicNote() options.

GitLab API docs: https://docs.gitlab.com/ee/api/notes.html#modify-existing-epic-note

type UpdateEpicOptions added in v0.39.1

type UpdateEpicOptions struct {
	Title            *string  `url:"title,omitempty" json:"title,omitempty"`
	Description      *string  `url:"description,omitempty" json:"description,omitempty"`
	Labels           Labels   `url:"labels,comma,omitempty" json:"labels,omitempty"`
	StartDateIsFixed *bool    `url:"start_date_is_fixed,omitempty" json:"start_date_is_fixed,omitempty"`
	StartDateFixed   *ISOTime `url:"start_date_fixed,omitempty" json:"start_date_fixed,omitempty"`
	DueDateIsFixed   *bool    `url:"due_date_is_fixed,omitempty" json:"due_date_is_fixed,omitempty"`
	DueDateFixed     *ISOTime `url:"due_date_fixed,omitempty" json:"due_date_fixed,omitempty"`
	StateEvent       *string  `url:"state_event,omitempty" json:"state_event,omitempty"`
}

UpdateEpicOptions represents the available UpdateEpic() options.

GitLab API docs: https://docs.gitlab.com/ee/api/epics.html#update-epic

type UpdateFileOptions

type UpdateFileOptions struct {
	Branch        *string `url:"branch,omitempty" json:"branch,omitempty"`
	Encoding      *string `url:"encoding,omitempty" json:"encoding,omitempty"`
	AuthorEmail   *string `url:"author_email,omitempty" json:"author_email,omitempty"`
	AuthorName    *string `url:"author_name,omitempty" json:"author_name,omitempty"`
	Content       *string `url:"content,omitempty" json:"content,omitempty"`
	CommitMessage *string `url:"commit_message,omitempty" json:"commit_message,omitempty"`
	LastCommitID  *string `url:"last_commit_id,omitempty" json:"last_commit_id,omitempty"`
}

UpdateFileOptions represents the available UpdateFile() options.

GitLab API docs: https://docs.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository

type UpdateFreezePeriodOptions added in v0.39.1

type UpdateFreezePeriodOptions struct {
	FreezeStart  *string `url:"freeze_start,omitempty" json:"freeze_start,omitempty"`
	FreezeEnd    *string `url:"freeze_end,omitempty" json:"freeze_end,omitempty"`
	CronTimezone *string `url:"cron_timezone,omitempty" json:"cron_timezone,omitempty"`
}

UpdateFreezePeriodOptions represents the available UpdateFreezePeriodOptions() options.

GitLab API docs: https://docs.gitlab.com/ce/api/freeze_periods.html#update-a-freeze-period

type UpdateGroupIssueBoardListOptions added in v0.11.0

type UpdateGroupIssueBoardListOptions struct {
	Position *int `url:"position" json:"position"`
}

UpdateGroupIssueBoardListOptions represents the available UpdateGroupIssueBoardList() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#edit-board-list

type UpdateGroupIssueBoardOptions added in v0.39.1

type UpdateGroupIssueBoardOptions struct {
	Name        *string `url:"name,omitempty" json:"name,omitempty"`
	AssigneeID  *int    `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	MilestoneID *int    `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
	Labels      Labels  `url:"labels,omitempty" json:"labels,omitempty"`
	Weight      *int    `url:"weight,omitempty" json:"weight,omitempty"`
}

UpdateGroupIssueBoardOptions represents a group issue board.

GitLab API docs: https://docs.gitlab.com/ce/api/group_boards.html#update-a-group-issue-board-premium

type UpdateGroupLabelOptions added in v0.39.1

type UpdateGroupLabelOptions UpdateLabelOptions

UpdateGroupLabelOptions represents the available UpdateGroupLabel() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_labels.html#update-a-group-label

type UpdateGroupMilestoneOptions added in v0.10.0

type UpdateGroupMilestoneOptions struct {
	Title       *string  `url:"title,omitempty" json:"title,omitempty"`
	Description *string  `url:"description,omitempty" json:"description,omitempty"`
	StartDate   *ISOTime `url:"start_date,omitempty" json:"start_date,omitempty"`
	DueDate     *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"`
	StateEvent  *string  `url:"state_event,omitempty" json:"state_event,omitempty"`
}

UpdateGroupMilestoneOptions represents the available UpdateGroupMilestone() options.

GitLab API docs: https://docs.gitlab.com/ce/api/group_milestones.html#edit-milestone

type UpdateGroupOptions added in v0.6.0

type UpdateGroupOptions CreateGroupOptions

UpdateGroupOptions represents the set of available options to update a Group; as of today these are exactly the same available when creating a new Group.

GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#update-group

type UpdateGroupVariableOptions added in v0.39.1

type UpdateGroupVariableOptions struct {
	Value        *string            `url:"value,omitempty" json:"value,omitempty"`
	VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"`
	Protected    *bool              `url:"protected,omitempty" json:"protected,omitempty"`
	Masked       *bool              `url:"masked,omitempty" json:"masked,omitempty"`
}

UpdateGroupVariableOptions represents the available UpdateVariable() options.

GitLab API docs: https://docs.gitlab.com/ee/api/group_level_variables.html#update-variable

type UpdateInstanceVariableOptions added in v0.39.1

type UpdateInstanceVariableOptions struct {
	Value        *string            `url:"value,omitempty" json:"value,omitempty"`
	VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"`
	Protected    *bool              `url:"protected,omitempty" json:"protected,omitempty"`
	Masked       *bool              `url:"masked,omitempty" json:"masked,omitempty"`
}

UpdateInstanceVariableOptions represents the available UpdateVariable() options.

GitLab API docs: https://docs.gitlab.com/ee/api/instance_level_ci_variables.html#update-instance-variable

type UpdateIssueBoardListOptions added in v0.8.0

type UpdateIssueBoardListOptions struct {
	Position *int `url:"position" json:"position"`
}

UpdateIssueBoardListOptions represents the available UpdateIssueBoardList() options.

GitLab API docs: https://docs.gitlab.com/ce/api/boards.html#edit-board-list

type UpdateIssueBoardOptions added in v0.39.1

type UpdateIssueBoardOptions struct {
	Name        *string `url:"name,omitempty" json:"name,omitempty"`
	AssigneeID  *int    `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	MilestoneID *int    `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
	Labels      Labels  `url:"labels,omitempty" json:"labels,omitempty"`
	Weight      *int    `url:"weight,omitempty" json:"weight,omitempty"`
}

UpdateIssueBoardOptions represents the available UpdateIssueBoard() options.

GitLab API docs: https://docs.gitlab.com/ee/api/boards.html#update-a-board-starter

type UpdateIssueDiscussionNoteOptions added in v0.11.2

type UpdateIssueDiscussionNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

UpdateIssueDiscussionNoteOptions represents the available UpdateIssueDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#modify-existing-issue-thread-note

type UpdateIssueNoteOptions

type UpdateIssueNoteOptions struct {
	Body *string `url:"body,omitempty" json:"body,omitempty"`
}

UpdateIssueNoteOptions represents the available UpdateIssueNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#modify-existing-issue-note

type UpdateIssueOptions

type UpdateIssueOptions struct {
	Title            *string    `url:"title,omitempty" json:"title,omitempty"`
	Description      *string    `url:"description,omitempty" json:"description,omitempty"`
	Confidential     *bool      `url:"confidential,omitempty" json:"confidential,omitempty"`
	AssigneeIDs      []int      `url:"assignee_ids,omitempty" json:"assignee_ids,omitempty"`
	MilestoneID      *int       `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
	Labels           Labels     `url:"labels,comma,omitempty" json:"labels,omitempty"`
	AddLabels        Labels     `url:"add_labels,comma,omitempty" json:"add_labels,omitempty"`
	RemoveLabels     Labels     `url:"remove_labels,comma,omitempty" json:"remove_labels,omitempty"`
	StateEvent       *string    `url:"state_event,omitempty" json:"state_event,omitempty"`
	UpdatedAt        *time.Time `url:"updated_at,omitempty" json:"updated_at,omitempty"`
	DueDate          *ISOTime   `url:"due_date,omitempty" json:"due_date,omitempty"`
	Weight           *int       `url:"weight,omitempty" json:"weight,omitempty"`
	DiscussionLocked *bool      `url:"discussion_locked,omitempty" json:"discussion_locked,omitempty"`
}

UpdateIssueOptions represents the available UpdateIssue() options.

GitLab API docs: https://docs.gitlab.com/ee/api/issues.html#edit-issue

type UpdateLabelOptions

type UpdateLabelOptions struct {
	Name        *string `url:"name,omitempty" json:"name,omitempty"`
	NewName     *string `url:"new_name,omitempty" json:"new_name,omitempty"`
	Color       *string `url:"color,omitempty" json:"color,omitempty"`
	Description *string `url:"description,omitempty" json:"description,omitempty"`
}

UpdateLabelOptions represents the available UpdateLabel() options.

GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label

type UpdateMergeRequestApprovalRuleOptions added in v0.39.1

type UpdateMergeRequestApprovalRuleOptions struct {
	Name              *string `url:"name,omitempty" json:"name,omitempty"`
	ApprovalsRequired *int    `url:"approvals_required,omitempty" json:"approvals_required,omitempty"`
	UserIDs           []int   `url:"user_ids,omitempty" json:"user_ids,omitempty"`
	GroupIDs          []int   `url:"group_ids,omitempty" json:"group_ids,omitempty"`
}

UpdateMergeRequestApprovalRuleOptions represents the available UpdateApprovalRule() options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#update-merge-request-level-rule

type UpdateMergeRequestDiscussionNoteOptions added in v0.11.2

type UpdateMergeRequestDiscussionNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
	Resolved  *bool      `url:"resolved,omitempty" json:"resolved,omitempty"`
}

UpdateMergeRequestDiscussionNoteOptions represents the available UpdateMergeRequestDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#modify-existing-merge-request-discussion-note

type UpdateMergeRequestNoteOptions

type UpdateMergeRequestNoteOptions struct {
	Body *string `url:"body,omitempty" json:"body,omitempty"`
}

UpdateMergeRequestNoteOptions represents the available UpdateMergeRequestNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note

type UpdateMergeRequestOptions

type UpdateMergeRequestOptions struct {
	Title              *string `url:"title,omitempty" json:"title,omitempty"`
	Description        *string `url:"description,omitempty" json:"description,omitempty"`
	TargetBranch       *string `url:"target_branch,omitempty" json:"target_branch,omitempty"`
	AssigneeID         *int    `url:"assignee_id,omitempty" json:"assignee_id,omitempty"`
	AssigneeIDs        []int   `url:"assignee_ids,omitempty" json:"assignee_ids,omitempty"`
	Labels             Labels  `url:"labels,comma,omitempty" json:"labels,omitempty"`
	AddLabels          Labels  `url:"add_labels,comma,omitempty" json:"add_labels,omitempty"`
	RemoveLabels       Labels  `url:"remove_labels,comma,omitempty" json:"remove_labels,omitempty"`
	MilestoneID        *int    `url:"milestone_id,omitempty" json:"milestone_id,omitempty"`
	StateEvent         *string `url:"state_event,omitempty" json:"state_event,omitempty"`
	RemoveSourceBranch *bool   `url:"remove_source_branch,omitempty" json:"remove_source_branch,omitempty"`
	Squash             *bool   `url:"squash,omitempty" json:"squash,omitempty"`
	DiscussionLocked   *bool   `url:"discussion_locked,omitempty" json:"discussion_locked,omitempty"`
	AllowCollaboration *bool   `url:"allow_collaboration,omitempty" json:"allow_collaboration,omitempty"`
}

UpdateMergeRequestOptions represents the available UpdateMergeRequest() options.

GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html#update-mr

type UpdateMilestoneOptions

type UpdateMilestoneOptions struct {
	Title       *string  `url:"title,omitempty" json:"title,omitempty"`
	Description *string  `url:"description,omitempty" json:"description,omitempty"`
	StartDate   *ISOTime `url:"start_date,omitempty" json:"start_date,omitempty"`
	DueDate     *ISOTime `url:"due_date,omitempty" json:"due_date,omitempty"`
	StateEvent  *string  `url:"state_event,omitempty" json:"state_event,omitempty"`
}

UpdateMilestoneOptions represents the available UpdateMilestone() options.

GitLab API docs: https://docs.gitlab.com/ce/api/milestones.html#edit-milestone

type UpdatePagesDomainOptions added in v0.8.0

type UpdatePagesDomainOptions struct {
	AutoSslEnabled *bool   `url:"auto_ssl_enabled,omitempty" json:"auto_ssl_enabled,omitempty"`
	Certificate    *string `url:"certifiate,omitempty" json:"certifiate,omitempty"`
	Key            *string `url:"key,omitempty" json:"key,omitempty"`
}

UpdatePagesDomainOptions represents the available UpdatePagesDomain() options.

GitLab API docs: https://docs.gitlab.com/ce/api/pages_domains.html#update-pages-domain

type UpdateProjectDeploymentOptions added in v0.39.1

type UpdateProjectDeploymentOptions struct {
	Status *DeploymentStatusValue `url:"status,omitempty" json:"status,omitempty"`
}

UpdateProjectDeploymentOptions represents the available UpdateProjectDeployment() options.

GitLab API docs: https://docs.gitlab.com/ee/api/deployments.html#updating-a-deployment

type UpdateProjectLevelRuleOptions added in v0.39.1

type UpdateProjectLevelRuleOptions struct {
	Name               *string `url:"name,omitempty" json:"name,omitempty"`
	ApprovalsRequired  *int    `url:"approvals_required,omitempty" json:"approvals_required,omitempty"`
	UserIDs            []int   `url:"user_ids,omitempty" json:"user_ids,omitempty"`
	GroupIDs           []int   `url:"group_ids,omitempty" json:"group_ids,omitempty"`
	ProtectedBranchIDs []int   `url:"protected_branch_ids,omitempty" json:"protected_branch_ids,omitempty"`
}

UpdateProjectLevelRuleOptions represents the available UpdateProjectApprovalRule() options.

GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#update-project-level-rules

type UpdateProjectSnippetOptions added in v0.7.2

type UpdateProjectSnippetOptions struct {
	Title       *string          `url:"title,omitempty" json:"title,omitempty"`
	FileName    *string          `url:"file_name,omitempty" json:"file_name,omitempty"`
	Description *string          `url:"description,omitempty" json:"description,omitempty"`
	Content     *string          `url:"content,omitempty" json:"content,omitempty"`
	Visibility  *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"`
}

UpdateProjectSnippetOptions represents the available UpdateSnippet() options.

GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#update-snippet

type UpdateProjectVariableOptions added in v0.39.1

type UpdateProjectVariableOptions struct {
	Value            *string            `url:"value,omitempty" json:"value,omitempty"`
	VariableType     *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"`
	Protected        *bool              `url:"protected,omitempty" json:"protected,omitempty"`
	Masked           *bool              `url:"masked,omitempty" json:"masked,omitempty"`
	EnvironmentScope *string            `url:"environment_scope,omitempty" json:"environment_scope,omitempty"`
}

UpdateProjectVariableOptions represents the available UpdateVariable() options.

GitLab API docs: https://docs.gitlab.com/ee/api/project_level_variables.html#update-variable

type UpdateReleaseLinkOptions added in v0.39.1

type UpdateReleaseLinkOptions struct {
	Name *string `url:"name,omitempty" json:"name,omitempty"`
	URL  *string `url:"url,omitempty" json:"url,omitempty"`
}

UpdateReleaseLinkOptions represents UpdateReleaseLink() options.

You have to specify at least one of Name of URL.

GitLab API docs: https://docs.gitlab.com/ee/api/releases/links.html#update-a-link

type UpdateReleaseNoteOptions added in v0.39.1

type UpdateReleaseNoteOptions struct {
	Description *string `url:"description:omitempty" json:"description,omitempty"`
}

UpdateReleaseNoteOptions represents the available UpdateReleaseNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/tags.html#update-a-release

type UpdateReleaseOptions added in v0.10.0

type UpdateReleaseOptions struct {
	Name        *string `url:"name" json:"name"`
	Description *string `url:"description" json:"description"`
}

UpdateReleaseOptions represents UpdateRelease() options.

GitLab API docs: https://docs.gitlab.com/ce/api/releases/index.html#update-a-release

type UpdateRunnerDetailsOptions added in v0.8.0

type UpdateRunnerDetailsOptions struct {
	Description    *string  `url:"description,omitempty" json:"description,omitempty"`
	Active         *bool    `url:"active,omitempty" json:"active,omitempty"`
	TagList        []string `url:"tag_list[],omitempty" json:"tag_list,omitempty"`
	RunUntagged    *bool    `url:"run_untagged,omitempty" json:"run_untagged,omitempty"`
	Locked         *bool    `url:"locked,omitempty" json:"locked,omitempty"`
	AccessLevel    *string  `url:"access_level,omitempty" json:"access_level,omitempty"`
	MaximumTimeout *int     `url:"maximum_timeout,omitempty" json:"maximum_timeout,omitempty"`
}

UpdateRunnerDetailsOptions represents the available UpdateRunnerDetails() options.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#update-runner-39-s-details

type UpdateSettingsOptions

type UpdateSettingsOptions struct {
	AdminNotificationEmail                    *string           `url:"admin_notification_email,omitempty" json:"admin_notification_email,omitempty"`
	AfterSignOutPath                          *string           `url:"after_sign_out_path,omitempty" json:"after_sign_out_path,omitempty"`
	AfterSignUpText                           *string           `url:"after_sign_up_text,omitempty" json:"after_sign_up_text,omitempty"`
	AkismetAPIKey                             *string           `url:"akismet_api_key,omitempty" json:"akismet_api_key,omitempty"`
	AkismetEnabled                            *bool             `url:"akismet_enabled,omitempty" json:"akismet_enabled,omitempty"`
	AllowGroupOwnersToManageLDAP              *bool             `url:"allow_group_owners_to_manage_ldap,omitempty" json:"allow_group_owners_to_manage_ldap,omitempty"`
	AllowLocalRequestsFromHooksAndServices    *bool             `url:"allow_local_requests_from_hooks_and_services,omitempty" json:"allow_local_requests_from_hooks_and_services,omitempty"`
	AllowLocalRequestsFromSystemHooks         *bool             `url:"allow_local_requests_from_system_hooks,omitempty" json:"allow_local_requests_from_system_hooks,omitempty"`
	AllowLocalRequestsFromWebHooksAndServices *bool             `` /* 130-byte string literal not displayed */
	ArchiveBuildsInHumanReadable              *string           `url:"archive_builds_in_human_readable,omitempty" json:"archive_builds_in_human_readable,omitempty"`
	AssetProxyEnabled                         *bool             `url:"asset_proxy_enabled,omitempty" json:"asset_proxy_enabled,omitempty"`
	AssetProxySecretKey                       *string           `url:"asset_proxy_secret_key,omitempty" json:"asset_proxy_secret_key,omitempty"`
	AssetProxyURL                             *string           `url:"asset_proxy_url,omitempty" json:"asset_proxy_url,omitempty"`
	AssetProxyWhitelist                       []string          `url:"asset_proxy_whitelist,omitempty" json:"asset_proxy_whitelist,omitempty"`
	AuthorizedKeysEnabled                     *bool             `url:"authorized_keys_enabled,omitempty" json:"authorized_keys_enabled,omitempty"`
	AutoDevOpsDomain                          *string           `url:"auto_devops_domain,omitempty" json:"auto_devops_domain,omitempty"`
	AutoDevOpsEnabled                         *bool             `url:"auto_devops_enabled,omitempty" json:"auto_devops_enabled,omitempty"`
	CheckNamespacePlan                        *bool             `url:"check_namespace_plan,omitempty" json:"check_namespace_plan,omitempty"`
	CommitEmailHostname                       *string           `url:"commit_email_hostname,omitempty" json:"commit_email_hostname,omitempty"`
	ContainerRegistryTokenExpireDelay         *int              `url:"container_registry_token_expire_delay,omitempty" json:"container_registry_token_expire_delay,omitempty"`
	DefaultArtifactsExpireIn                  *string           `url:"default_artifacts_expire_in,omitempty" json:"default_artifacts_expire_in,omitempty"`
	DefaultBranchProtection                   *int              `url:"default_branch_protection,omitempty" json:"default_branch_protection,omitempty"`
	DefaultGroupVisibility                    *VisibilityValue  `url:"default_group_visibility,omitempty" json:"default_group_visibility,omitempty"`
	DefaultProjectCreation                    *int              `url:"default_project_creation,omitempty" json:"default_project_creation,omitempty"`
	DefaultProjectsLimit                      *int              `url:"default_projects_limit,omitempty" json:"default_projects_limit,omitempty"`
	DefaultProjectVisibility                  *VisibilityValue  `url:"default_project_visibility,omitempty" json:"default_project_visibility,omitempty"`
	DefaultSnippetVisibility                  *VisibilityValue  `url:"default_snippet_visibility,omitempty" json:"default_snippet_visibility,omitempty"`
	DiffMaxPatchBytes                         *int              `url:"diff_max_patch_bytes,omitempty" json:"diff_max_patch_bytes,omitempty"`
	DisabledOauthSignInSources                []string          `url:"disabled_oauth_sign_in_sources,omitempty" json:"disabled_oauth_sign_in_sources,omitempty"`
	DNSRebindingProtectionEnabled             *bool             `url:"dns_rebinding_protection_enabled,omitempty" json:"dns_rebinding_protection_enabled,omitempty"`
	DomainBlacklist                           []string          `url:"domain_blacklist,omitempty" json:"domain_blacklist,omitempty"`
	DomainBlacklistEnabled                    *bool             `url:"domain_blacklist_enabled,omitempty" json:"domain_blacklist_enabled,omitempty"`
	DomainWhitelist                           []string          `url:"domain_whitelist,omitempty" json:"domain_whitelist,omitempty"`
	DSAKeyRestriction                         *int              `url:"dsa_key_restriction,omitempty" json:"dsa_key_restriction,omitempty"`
	ECDSAKeyRestriction                       *int              `url:"ecdsa_key_restriction,omitempty" json:"ecdsa_key_restriction,omitempty"`
	Ed25519KeyRestriction                     *int              `url:"ed25519_key_restriction,omitempty" json:"ed25519_key_restriction,omitempty"`
	ElasticsearchAWSAccessKey                 *string           `url:"elasticsearch_aws_access_key,omitempty" json:"elasticsearch_aws_access_key,omitempty"`
	ElasticsearchAWS                          *bool             `url:"elasticsearch_aws,omitempty" json:"elasticsearch_aws,omitempty"`
	ElasticsearchAWSRegion                    *string           `url:"elasticsearch_aws_region,omitempty" json:"elasticsearch_aws_region,omitempty"`
	ElasticsearchAWSSecretAccessKey           *string           `url:"elasticsearch_aws_secret_access_key,omitempty" json:"elasticsearch_aws_secret_access_key,omitempty"`
	ElasticsearchIndexing                     *bool             `url:"elasticsearch_indexing,omitempty" json:"elasticsearch_indexing,omitempty"`
	ElasticsearchLimitIndexing                *bool             `url:"elasticsearch_limit_indexing,omitempty" json:"elasticsearch_limit_indexing,omitempty"`
	ElasticsearchNamespaceIDs                 []int             `url:"elasticsearch_namespace_ids,omitempty" json:"elasticsearch_namespace_ids,omitempty"`
	ElasticsearchProjectIDs                   []int             `url:"elasticsearch_project_ids,omitempty" json:"elasticsearch_project_ids,omitempty"`
	ElasticsearchSearch                       *bool             `url:"elasticsearch_search,omitempty" json:"elasticsearch_search,omitempty"`
	ElasticsearchURL                          *string           `url:"elasticsearch_url,omitempty" json:"elasticsearch_url,omitempty"`
	EmailAdditionalText                       *string           `url:"email_additional_text,omitempty" json:"email_additional_text,omitempty"`
	EmailAuthorInBody                         *bool             `url:"email_author_in_body,omitempty" json:"email_author_in_body,omitempty"`
	EnabledGitAccessProtocol                  *string           `url:"enabled_git_access_protocol,omitempty" json:"enabled_git_access_protocol,omitempty"`
	EnforceTerms                              *bool             `url:"enforce_terms,omitempty" json:"enforce_terms,omitempty"`
	ExternalAuthClientCert                    *string           `url:"external_auth_client_cert,omitempty" json:"external_auth_client_cert,omitempty"`
	ExternalAuthClientKeyPass                 *string           `url:"external_auth_client_key_pass,omitempty" json:"external_auth_client_key_pass,omitempty"`
	ExternalAuthClientKey                     *string           `url:"external_auth_client_key,omitempty" json:"external_auth_client_key,omitempty"`
	ExternalAuthorizationServiceDefaultLabel  *string           `url:"external_authorization_service_default_label,omitempty" json:"external_authorization_service_default_label,omitempty"`
	ExternalAuthorizationServiceEnabled       *bool             `url:"external_authorization_service_enabled,omitempty" json:"external_authorization_service_enabled,omitempty"`
	ExternalAuthorizationServiceTimeout       *float64          `url:"external_authorization_service_timeout,omitempty" json:"external_authorization_service_timeout,omitempty"`
	ExternalAuthorizationServiceURL           *string           `url:"external_authorization_service_url,omitempty" json:"external_authorization_service_url,omitempty"`
	FileTemplateProjectID                     *int              `url:"file_template_project_id,omitempty" json:"file_template_project_id,omitempty"`
	FirstDayOfWeek                            *int              `url:"first_day_of_week,omitempty" json:"first_day_of_week,omitempty"`
	GeoNodeAllowedIPs                         *string           `url:"geo_node_allowed_ips,omitempty" json:"geo_node_allowed_ips,omitempty"`
	GeoStatusTimeout                          *int              `url:"geo_status_timeout,omitempty" json:"geo_status_timeout,omitempty"`
	GitalyTimeoutDefault                      *int              `url:"gitaly_timeout_default,omitempty" json:"gitaly_timeout_default,omitempty"`
	GitalyTimeoutFast                         *int              `url:"gitaly_timeout_fast,omitempty" json:"gitaly_timeout_fast,omitempty"`
	GitalyTimeoutMedium                       *int              `url:"gitaly_timeout_medium,omitempty" json:"gitaly_timeout_medium,omitempty"`
	GrafanaEnabled                            *bool             `url:"grafana_enabled,omitempty" json:"grafana_enabled,omitempty"`
	GrafanaURL                                *string           `url:"grafana_url,omitempty" json:"grafana_url,omitempty"`
	GravatarEnabled                           *bool             `url:"gravatar_enabled,omitempty" json:"gravatar_enabled,omitempty"`
	HashedStorageEnabled                      *bool             `url:"hashed_storage_enabled,omitempty" json:"hashed_storage_enabled,omitempty"`
	HelpPageHideCommercialContent             *bool             `url:"help_page_hide_commercial_content,omitempty" json:"help_page_hide_commercial_content,omitempty"`
	HelpPageSupportURL                        *string           `url:"help_page_support_url,omitempty" json:"help_page_support_url,omitempty"`
	HelpPageText                              *string           `url:"help_page_text,omitempty" json:"help_page_text,omitempty"`
	HelpText                                  *string           `url:"help_text,omitempty" json:"help_text,omitempty"`
	HideThirdPartyOffers                      *bool             `url:"hide_third_party_offers,omitempty" json:"hide_third_party_offers,omitempty"`
	HomePageURL                               *string           `url:"home_page_url,omitempty" json:"home_page_url,omitempty"`
	HousekeepingBitmapsEnabled                *bool             `url:"housekeeping_bitmaps_enabled,omitempty" json:"housekeeping_bitmaps_enabled,omitempty"`
	HousekeepingEnabled                       *bool             `url:"housekeeping_enabled,omitempty" json:"housekeeping_enabled,omitempty"`
	HousekeepingFullRepackPeriod              *int              `url:"housekeeping_full_repack_period,omitempty" json:"housekeeping_full_repack_period,omitempty"`
	HousekeepingGcPeriod                      *int              `url:"housekeeping_gc_period,omitempty" json:"housekeeping_gc_period,omitempty"`
	HousekeepingIncrementalRepackPeriod       *int              `url:"housekeeping_incremental_repack_period,omitempty" json:"housekeeping_incremental_repack_period,omitempty"`
	HTMLEmailsEnabled                         *bool             `url:"html_emails_enabled,omitempty" json:"html_emails_enabled,omitempty"`
	ImportSources                             []string          `url:"import_sources,omitempty" json:"import_sources,omitempty"`
	InstanceStatisticsVisibilityPrivate       *bool             `url:"instance_statistics_visibility_private,omitempty" json:"instance_statistics_visibility_private,omitempty"`
	LocalMarkdownVersion                      *int              `url:"local_markdown_version,omitempty" json:"local_markdown_version,omitempty"`
	MaxArtifactsSize                          *int              `url:"max_artifacts_size,omitempty" json:"max_artifacts_size,omitempty"`
	MaxAttachmentSize                         *int              `url:"max_attachment_size,omitempty" json:"max_attachment_size,omitempty"`
	MaxPagesSize                              *int              `url:"max_pages_size,omitempty" json:"max_pages_size,omitempty"`
	MetricsEnabled                            *bool             `url:"metrics_enabled,omitempty" json:"metrics_enabled,omitempty"`
	MetricsHost                               *string           `url:"metrics_host,omitempty" json:"metrics_host,omitempty"`
	MetricsMethodCallThreshold                *int              `url:"metrics_method_call_threshold,omitempty" json:"metrics_method_call_threshold,omitempty"`
	MetricsPacketSize                         *int              `url:"metrics_packet_size,omitempty" json:"metrics_packet_size,omitempty"`
	MetricsPoolSize                           *int              `url:"metrics_pool_size,omitempty" json:"metrics_pool_size,omitempty"`
	MetricsPort                               *int              `url:"metrics_port,omitempty" json:"metrics_port,omitempty"`
	MetricsSampleInterval                     *int              `url:"metrics_sample_interval,omitempty" json:"metrics_sample_interval,omitempty"`
	MetricsTimeout                            *int              `url:"metrics_timeout,omitempty" json:"metrics_timeout,omitempty"`
	MirrorAvailable                           *bool             `url:"mirror_available,omitempty" json:"mirror_available,omitempty"`
	MirrorCapacityThreshold                   *int              `url:"mirror_capacity_threshold,omitempty" json:"mirror_capacity_threshold,omitempty"`
	MirrorMaxCapacity                         *int              `url:"mirror_max_capacity,omitempty" json:"mirror_max_capacity,omitempty"`
	MirrorMaxDelay                            *int              `url:"mirror_max_delay,omitempty" json:"mirror_max_delay,omitempty"`
	OutboundLocalRequestsWhitelist            []string          `url:"outbound_local_requests_whitelist,omitempty" json:"outbound_local_requests_whitelist,omitempty"`
	PagesDomainVerificationEnabled            *bool             `url:"pages_domain_verification_enabled,omitempty" json:"pages_domain_verification_enabled,omitempty"`
	PasswordAuthenticationEnabledForGit       *bool             `url:"password_authentication_enabled_for_git,omitempty" json:"password_authentication_enabled_for_git,omitempty"`
	PasswordAuthenticationEnabledForWeb       *bool             `url:"password_authentication_enabled_for_web,omitempty" json:"password_authentication_enabled_for_web,omitempty"`
	PerformanceBarAllowedGroupID              *string           `url:"performance_bar_allowed_group_id,omitempty" json:"performance_bar_allowed_group_id,omitempty"`
	PerformanceBarAllowedGroupPath            *string           `url:"performance_bar_allowed_group_path,omitempty" json:"performance_bar_allowed_group_path,omitempty"`
	PerformanceBarEnabled                     *bool             `url:"performance_bar_enabled,omitempty" json:"performance_bar_enabled,omitempty"`
	PlantumlEnabled                           *bool             `url:"plantuml_enabled,omitempty" json:"plantuml_enabled,omitempty"`
	PlantumlURL                               *string           `url:"plantuml_url,omitempty" json:"plantuml_url,omitempty"`
	PollingIntervalMultiplier                 *float64          `url:"polling_interval_multiplier,omitempty" json:"polling_interval_multiplier,omitempty"`
	ProjectExportEnabled                      *bool             `url:"project_export_enabled,omitempty" json:"project_export_enabled,omitempty"`
	PrometheusMetricsEnabled                  *bool             `url:"prometheus_metrics_enabled,omitempty" json:"prometheus_metrics_enabled,omitempty"`
	ProtectedCIVariables                      *bool             `url:"protected_ci_variables,omitempty" json:"protected_ci_variables,omitempty"`
	PseudonymizerEnabled                      *bool             `url:"psedonymizer_enabled,omitempty" json:"psedonymizer_enabled,omitempty"`
	PushEventHooksLimit                       *int              `url:"push_event_hooks_limit,omitempty" json:"push_event_hooks_limit,omitempty"`
	PushEventActivitiesLimit                  *int              `url:"push_event_activities_limit,omitempty" json:"push_event_activities_limit,omitempty"`
	RecaptchaEnabled                          *bool             `url:"recaptcha_enabled,omitempty" json:"recaptcha_enabled,omitempty"`
	RecaptchaPrivateKey                       *string           `url:"recaptcha_private_key,omitempty" json:"recaptcha_private_key,omitempty"`
	RecaptchaSiteKey                          *string           `url:"recaptcha_site_key,omitempty" json:"recaptcha_site_key,omitempty"`
	ReceiveMaxInputSize                       *int              `url:"receive_max_input_size,omitempty" json:"receive_max_input_size,omitempty"`
	RepositoryChecksEnabled                   *bool             `url:"repository_checks_enabled,omitempty" json:"repository_checks_enabled,omitempty"`
	RepositorySizeLimit                       *int              `url:"repository_size_limit,omitempty" json:"repository_size_limit,omitempty"`
	RepositoryStorages                        []string          `url:"repository_storages,omitempty" json:"repository_storages,omitempty"`
	RequireTwoFactorAuthentication            *bool             `url:"require_two_factor_authentication,omitempty" json:"require_two_factor_authentication,omitempty"`
	RestrictedVisibilityLevels                []VisibilityValue `url:"restricted_visibility_levels,omitempty" json:"restricted_visibility_levels,omitempty"`
	RsaKeyRestriction                         *int              `url:"rsa_key_restriction,omitempty" json:"rsa_key_restriction,omitempty"`
	SendUserConfirmationEmail                 *bool             `url:"send_user_confirmation_email,omitempty" json:"send_user_confirmation_email,omitempty"`
	SessionExpireDelay                        *int              `url:"session_expire_delay,omitempty" json:"session_expire_delay,omitempty"`
	SharedRunnersEnabled                      *bool             `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
	SharedRunnersMinutes                      *int              `url:"shared_runners_minutes,omitempty" json:"shared_runners_minutes,omitempty"`
	SharedRunnersText                         *string           `url:"shared_runners_text,omitempty" json:"shared_runners_text,omitempty"`
	SignInText                                *string           `url:"sign_in_text,omitempty" json:"sign_in_text,omitempty"`
	SignupEnabled                             *bool             `url:"signup_enabled,omitempty" json:"signup_enabled,omitempty"`
	SlackAppEnabled                           *bool             `url:"slack_app_enabled,omitempty" json:"slack_app_enabled,omitempty"`
	SlackAppID                                *string           `url:"slack_app_id,omitempty" json:"slack_app_id,omitempty"`
	SlackAppSecret                            *string           `url:"slack_app_secret,omitempty" json:"slack_app_secret,omitempty"`
	SlackAppVerificationToken                 *string           `url:"slack_app_verification_token,omitempty" json:"slack_app_verification_token,omitempty"`
	SnowplowCollectorHostname                 *string           `url:"snowplow_collector_hostname,omitempty" json:"snowplow_collector_hostname,omitempty"`
	SnowplowCookieDomain                      *string           `url:"snowplow_cookie_domain,omitempty" json:"snowplow_cookie_domain,omitempty"`
	SnowplowEnabled                           *bool             `url:"snowplow_enabled,omitempty" json:"snowplow_enabled,omitempty"`
	SnowplowSiteID                            *string           `url:"snowplow_site_id,omitempty" json:"snowplow_site_id,omitempty"`
	TerminalMaxSessionTime                    *int              `url:"terminal_max_session_time,omitempty" json:"terminal_max_session_time,omitempty"`
	Terms                                     *string           `url:"terms,omitempty" json:"terms,omitempty"`
	ThrottleAuthenticatedAPIEnabled           *bool             `url:"throttle_authenticated_api_enabled,omitempty" json:"throttle_authenticated_api_enabled,omitempty"`
	ThrottleAuthenticatedAPIPeriodInSeconds   *int              `url:"throttle_authenticated_api_period_in_seconds,omitempty" json:"throttle_authenticated_api_period_in_seconds,omitempty"`
	ThrottleAuthenticatedAPIRequestsPerPeriod *int              `` /* 126-byte string literal not displayed */
	ThrottleAuthenticatedWebEnabled           *bool             `url:"throttle_authenticated_web_enabled,omitempty" json:"throttle_authenticated_web_enabled,omitempty"`
	ThrottleAuthenticatedWebPeriodInSeconds   *int              `url:"throttle_authenticated_web_period_in_seconds,omitempty" json:"throttle_authenticated_web_period_in_seconds,omitempty"`
	ThrottleAuthenticatedWebRequestsPerPeriod *int              `` /* 126-byte string literal not displayed */
	ThrottleUnauthenticatedEnabled            *bool             `url:"throttle_unauthenticated_enabled,omitempty" json:"throttle_unauthenticated_enabled,omitempty"`
	ThrottleUnauthenticatedPeriodInSeconds    *int              `url:"throttle_unauthenticated_period_in_seconds,omitempty" json:"throttle_unauthenticated_period_in_seconds,omitempty"`
	ThrottleUnauthenticatedRequestsPerPeriod  *int              `url:"throttle_unauthenticated_requests_per_period,omitempty" json:"throttle_unauthenticated_requests_per_period,omitempty"`
	TimeTrackingLimitToHours                  *bool             `url:"time_tracking_limit_to_hours,omitempty" json:"time_tracking_limit_to_hours,omitempty"`
	TwoFactorGracePeriod                      *int              `url:"two_factor_grace_period,omitempty" json:"two_factor_grace_period,omitempty"`
	UniqueIPsLimitEnabled                     *bool             `url:"unique_ips_limit_enabled,omitempty" json:"unique_ips_limit_enabled,omitempty"`
	UniqueIPsLimitPerUser                     *int              `url:"unique_ips_limit_per_user,omitempty" json:"unique_ips_limit_per_user,omitempty"`
	UniqueIPsLimitTimeWindow                  *int              `url:"unique_ips_limit_time_window,omitempty" json:"unique_ips_limit_time_window,omitempty"`
	UsagePingEnabled                          *bool             `url:"usage_ping_enabled,omitempty" json:"usage_ping_enabled,omitempty"`
	UserDefaultExternal                       *bool             `url:"user_default_external,omitempty" json:"user_default_external,omitempty"`
	UserDefaultInternalRegex                  *string           `url:"user_default_internal_regex,omitempty" json:"user_default_internal_regex,omitempty"`
	UserOauthApplications                     *bool             `url:"user_oauth_applications,omitempty" json:"user_oauth_applications,omitempty"`
	UserShowAddSSHKeyMessage                  *bool             `url:"user_show_add_ssh_key_message,omitempty" json:"user_show_add_ssh_key_message,omitempty"`
	VersionCheckEnabled                       *bool             `url:"version_check_enabled,omitempty" json:"version_check_enabled,omitempty"`
	WebIDEClientsidePreviewEnabled            *bool             `url:"web_ide_clientside_preview_enabled,omitempty" json:"web_ide_clientside_preview_enabled,omitempty"`
}

UpdateSettingsOptions represents the available UpdateSettings() options.

GitLab API docs: https://docs.gitlab.com/ce/api/settings.html#change-application.settings

type UpdateSnippetDiscussionNoteOptions added in v0.11.2

type UpdateSnippetDiscussionNoteOptions struct {
	Body      *string    `url:"body,omitempty" json:"body,omitempty"`
	CreatedAt *time.Time `url:"created_at,omitempty" json:"created_at,omitempty"`
}

UpdateSnippetDiscussionNoteOptions represents the available UpdateSnippetDiscussion() options.

GitLab API docs: https://docs.gitlab.com/ce/api/discussions.html#modify-existing-snippet-thread-note

type UpdateSnippetNoteOptions

type UpdateSnippetNoteOptions struct {
	Body *string `url:"body,omitempty" json:"body,omitempty"`
}

UpdateSnippetNoteOptions represents the available UpdateSnippetNote() options.

GitLab API docs: https://docs.gitlab.com/ce/api/notes.html#modify-existing-snippet-note

type UpdateSnippetOptions

type UpdateSnippetOptions struct {
	Title       *string          `url:"title,omitempty" json:"title,omitempty"`
	FileName    *string          `url:"file_name,omitempty" json:"file_name,omitempty"`
	Description *string          `url:"description,omitempty" json:"description,omitempty"`
	Content     *string          `url:"content,omitempty" json:"content,omitempty"`
	Visibility  *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"`
}

UpdateSnippetOptions represents the available UpdateSnippet() options.

GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#update-snippet

type User

type User struct {
	ID                        int                `json:"id"`
	Username                  string             `json:"username"`
	Email                     string             `json:"email"`
	Name                      string             `json:"name"`
	State                     string             `json:"state"`
	WebURL                    string             `json:"web_url"`
	CreatedAt                 *time.Time         `json:"created_at"`
	Bio                       string             `json:"bio"`
	Location                  string             `json:"location"`
	PublicEmail               string             `json:"public_email"`
	Skype                     string             `json:"skype"`
	Linkedin                  string             `json:"linkedin"`
	Twitter                   string             `json:"twitter"`
	WebsiteURL                string             `json:"website_url"`
	Organization              string             `json:"organization"`
	ExternUID                 string             `json:"extern_uid"`
	Provider                  string             `json:"provider"`
	ThemeID                   int                `json:"theme_id"`
	LastActivityOn            *ISOTime           `json:"last_activity_on"`
	ColorSchemeID             int                `json:"color_scheme_id"`
	IsAdmin                   bool               `json:"is_admin"`
	AvatarURL                 string             `json:"avatar_url"`
	CanCreateGroup            bool               `json:"can_create_group"`
	CanCreateProject          bool               `json:"can_create_project"`
	ProjectsLimit             int                `json:"projects_limit"`
	CurrentSignInAt           *time.Time         `json:"current_sign_in_at"`
	LastSignInAt              *time.Time         `json:"last_sign_in_at"`
	ConfirmedAt               *time.Time         `json:"confirmed_at"`
	TwoFactorEnabled          bool               `json:"two_factor_enabled"`
	Identities                []*UserIdentity    `json:"identities"`
	External                  bool               `json:"external"`
	PrivateProfile            bool               `json:"private_profile"`
	SharedRunnersMinutesLimit int                `json:"shared_runners_minutes_limit"`
	CustomAttributes          []*CustomAttribute `json:"custom_attributes"`
}

User represents a GitLab user.

GitLab API docs: https://docs.gitlab.com/ee/api/users.html

type UserActivity added in v0.7.2

type UserActivity struct {
	Username       string   `json:"username"`
	LastActivityOn *ISOTime `json:"last_activity_on"`
}

UserActivity represents an entry in the user/activities response

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#get-user-activities-admin-only

type UserGroupSystemEvent added in v0.39.1

type UserGroupSystemEvent struct {
	BaseSystemEvent
	ID          int    `json:"user_id"`
	Name        string `json:"user_name"`
	Username    string `json:"user_username"`
	Email       string `json:"user_email"`
	GroupID     int    `json:"group_id"`
	GroupName   string `json:"group_name"`
	GroupPath   string `json:"group_path"`
	GroupAccess string `json:"group_access"`
}

UserGroupSystemEvent represents a user group system event.

GitLab API docs: https://docs.gitlab.com/ee/system_hooks/system_hooks.html

type UserIdentity

type UserIdentity struct {
	Provider  string `json:"provider"`
	ExternUID string `json:"extern_uid"`
}

UserIdentity represents a user identity.

type UserMembership added in v0.39.1

type UserMembership struct {
	SourceID    int    `json:"source_id"`
	SourceName  string `json:"source_name"`
	SourceType  string `json:"source_type"`
	AccessLevel string `json:"access_level"`
}

UserMembership represents a membership of the user in a namespace or project.

GitLab API docs: https://docs.gitlab.com/ee/api/users.html#user-memberships-admin-only

type UserStatus added in v0.39.1

type UserStatus struct {
	Emoji       string `json:"emoji"`
	Message     string `json:"message"`
	MessageHTML string `json:"message_html"`
}

UserStatus represents the current status of a user

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-status

type UserStatusOptions added in v0.39.1

type UserStatusOptions struct {
	Emoji   *string `url:"emoji,omitempty" json:"emoji,omitempty"`
	Message *string `url:"message,omitempty" json:"message,omitempty"`
}

UserStatusOptions represents the options required to set the status

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#set-user-status

type UserSystemEvent added in v0.39.1

type UserSystemEvent struct {
	BaseSystemEvent
	ID          int    `json:"user_id"`
	Name        string `json:"name"`
	Username    string `json:"username"`
	OldUsername string `json:"old_username,omitempty"`
	Email       string `json:"email"`
}

UserSystemEvent represents a user system event.

GitLab API docs: https://docs.gitlab.com/ee/system_hooks/system_hooks.html

type UserTeamSystemEvent added in v0.39.1

type UserTeamSystemEvent struct {
	BaseSystemEvent
	ID                       int    `json:"user_id"`
	Name                     string `json:"user_name"`
	Username                 string `json:"user_username"`
	Email                    string `json:"user_email"`
	ProjectID                int    `json:"project_id"`
	ProjectName              string `json:"project_name"`
	ProjectPath              string `json:"project_path"`
	ProjectPathWithNamespace string `json:"project_path_with_namespace"`
	ProjectVisibility        string `json:"project_visibility"`
	AccessLevel              string `json:"access_level"`
}

UserTeamSystemEvent represents a user team system event.

GitLab API docs: https://docs.gitlab.com/ee/system_hooks/system_hooks.html

type UsersService

type UsersService struct {
	// contains filtered or unexported fields
}

UsersService handles communication with the user related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html

func (*UsersService) ActivateUser added in v0.39.1

func (s *UsersService) ActivateUser(user int, options ...RequestOptionFunc) error

ActivateUser activate the specified user. Available only for admin.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#activate-user

func (*UsersService) AddEmail added in v0.4.0

func (s *UsersService) AddEmail(opt *AddEmailOptions, options ...RequestOptionFunc) (*Email, *Response, error)

AddEmail creates a new email owned by the currently authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-email

func (*UsersService) AddEmailForUser added in v0.4.0

func (s *UsersService) AddEmailForUser(user int, opt *AddEmailOptions, options ...RequestOptionFunc) (*Email, *Response, error)

AddEmailForUser creates new email owned by specified user. Available only for admin.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-email-for-user

func (*UsersService) AddSSHKey

func (s *UsersService) AddSSHKey(opt *AddSSHKeyOptions, options ...RequestOptionFunc) (*SSHKey, *Response, error)

AddSSHKey creates a new key owned by the currently authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-ssh-key

func (*UsersService) AddSSHKeyForUser

func (s *UsersService) AddSSHKeyForUser(user int, opt *AddSSHKeyOptions, options ...RequestOptionFunc) (*SSHKey, *Response, error)

AddSSHKeyForUser creates new key owned by specified user. Available only for admin.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-ssh-key-for-user

func (*UsersService) BlockUser

func (s *UsersService) BlockUser(user int, options ...RequestOptionFunc) error

BlockUser blocks the specified user. Available only for admin.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#block-user

func (*UsersService) CreateImpersonationToken added in v0.6.0

func (s *UsersService) CreateImpersonationToken(user int, opt *CreateImpersonationTokenOptions, options ...RequestOptionFunc) (*ImpersonationToken, *Response, error)

CreateImpersonationToken creates an impersonation token.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#create-an-impersonation-token

func (*UsersService) CreateUser

func (s *UsersService) CreateUser(opt *CreateUserOptions, options ...RequestOptionFunc) (*User, *Response, error)

CreateUser creates a new user. Note only administrators can create new users.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-creation

func (*UsersService) CurrentUser

func (s *UsersService) CurrentUser(options ...RequestOptionFunc) (*User, *Response, error)

CurrentUser gets currently authenticated user.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#current-user

func (*UsersService) CurrentUserStatus added in v0.39.1

func (s *UsersService) CurrentUserStatus(options ...RequestOptionFunc) (*UserStatus, *Response, error)

CurrentUserStatus retrieves the user status

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-status

func (*UsersService) DeactivateUser added in v0.39.1

func (s *UsersService) DeactivateUser(user int, options ...RequestOptionFunc) error

DeactivateUser deactivate the specified user. Available only for admin.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#deactivate-user

func (*UsersService) DeleteEmail added in v0.4.0

func (s *UsersService) DeleteEmail(email int, options ...RequestOptionFunc) (*Response, error)

DeleteEmail deletes email owned by currently authenticated user. This is an idempotent function and calling it on a key that is already deleted or not available results in 200 OK.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#delete-email-for-current-owner

func (*UsersService) DeleteEmailForUser added in v0.4.0

func (s *UsersService) DeleteEmailForUser(user, email int, options ...RequestOptionFunc) (*Response, error)

DeleteEmailForUser deletes email owned by a specified user. Available only for admin.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#delete-email-for-given-user

func (*UsersService) DeleteSSHKey

func (s *UsersService) DeleteSSHKey(key int, options ...RequestOptionFunc) (*Response, error)

DeleteSSHKey deletes key owned by currently authenticated user. This is an idempotent function and calling it on a key that is already deleted or not available results in 200 OK.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#delete-ssh-key-for-current-owner

func (*UsersService) DeleteSSHKeyForUser

func (s *UsersService) DeleteSSHKeyForUser(user, key int, options ...RequestOptionFunc) (*Response, error)

DeleteSSHKeyForUser deletes key owned by a specified user. Available only for admin.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#delete-ssh-key-for-given-user

func (*UsersService) DeleteUser

func (s *UsersService) DeleteUser(user int, options ...RequestOptionFunc) (*Response, error)

DeleteUser deletes a user. Available only for administrators. This is an idempotent function, calling this function for a non-existent user id still returns a status code 200 OK. The JSON response differs if the user was actually deleted or not. In the former the user is returned and in the latter not.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-deletion

func (*UsersService) GetAllImpersonationTokens added in v0.6.0

func (s *UsersService) GetAllImpersonationTokens(user int, opt *GetAllImpersonationTokensOptions, options ...RequestOptionFunc) ([]*ImpersonationToken, *Response, error)

GetAllImpersonationTokens retrieves all impersonation tokens of a user.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#get-all-impersonation-tokens-of-a-user

func (*UsersService) GetEmail added in v0.4.0

func (s *UsersService) GetEmail(email int, options ...RequestOptionFunc) (*Email, *Response, error)

GetEmail gets a single email.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#single-email

func (*UsersService) GetImpersonationToken added in v0.6.0

func (s *UsersService) GetImpersonationToken(user, token int, options ...RequestOptionFunc) (*ImpersonationToken, *Response, error)

GetImpersonationToken retrieves an impersonation token of a user.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#get-an-impersonation-token-of-a-user

func (*UsersService) GetSSHKey

func (s *UsersService) GetSSHKey(key int, options ...RequestOptionFunc) (*SSHKey, *Response, error)

GetSSHKey gets a single key.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#single-ssh-key

func (*UsersService) GetUser

func (s *UsersService) GetUser(user int, options ...RequestOptionFunc) (*User, *Response, error)

GetUser gets a single user.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#single-user

func (*UsersService) GetUserActivities added in v0.7.2

func (s *UsersService) GetUserActivities(opt *GetUserActivitiesOptions, options ...RequestOptionFunc) ([]*UserActivity, *Response, error)

GetUserActivities retrieves user activities (admin only)

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#get-user-activities-admin-only

func (*UsersService) GetUserMemberships added in v0.39.1

func (s *UsersService) GetUserMemberships(user int, opt *GetUserMembershipOptions, options ...RequestOptionFunc) ([]*UserMembership, *Response, error)

GetUserMemberships retrieves a list of the user's memberships.

GitLab API docs: https://docs.gitlab.com/ee/api/users.html#user-memberships-admin-only

func (*UsersService) GetUserStatus added in v0.39.1

func (s *UsersService) GetUserStatus(user int, options ...RequestOptionFunc) (*UserStatus, *Response, error)

GetUserStatus retrieves a user's status

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#get-the-status-of-a-user

func (*UsersService) ListEmails added in v0.4.0

func (s *UsersService) ListEmails(options ...RequestOptionFunc) ([]*Email, *Response, error)

ListEmails gets a list of currently authenticated user's Emails.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-emails

func (*UsersService) ListEmailsForUser added in v0.4.0

func (s *UsersService) ListEmailsForUser(user int, opt *ListEmailsForUserOptions, options ...RequestOptionFunc) ([]*Email, *Response, error)

ListEmailsForUser gets a list of a specified user's Emails. Available only for admin

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-emails-for-user

func (*UsersService) ListSSHKeys

func (s *UsersService) ListSSHKeys(options ...RequestOptionFunc) ([]*SSHKey, *Response, error)

ListSSHKeys gets a list of currently authenticated user's SSH keys.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-ssh-keys

func (*UsersService) ListSSHKeysForUser

func (s *UsersService) ListSSHKeysForUser(user int, opt *ListSSHKeysForUserOptions, options ...RequestOptionFunc) ([]*SSHKey, *Response, error)

ListSSHKeysForUser gets a list of a specified user's SSH keys. Available only for admin

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-ssh-keys-for-user

func (*UsersService) ListUserContributionEvents added in v0.8.0

func (s *UsersService) ListUserContributionEvents(uid interface{}, opt *ListContributionEventsOptions, options ...RequestOptionFunc) ([]*ContributionEvent, *Response, error)

ListUserContributionEvents retrieves user contribution events for the specified user, sorted from newest to oldest.

GitLab API docs: https://docs.gitlab.com/ce/api/events.html#get-user-contribution-events

func (*UsersService) ListUsers

func (s *UsersService) ListUsers(opt *ListUsersOptions, options ...RequestOptionFunc) ([]*User, *Response, error)

ListUsers gets a list of users.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-users

func (*UsersService) ModifyUser

func (s *UsersService) ModifyUser(user int, opt *ModifyUserOptions, options ...RequestOptionFunc) (*User, *Response, error)

ModifyUser modifies an existing user. Only administrators can change attributes of a user.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-modification

func (*UsersService) RevokeImpersonationToken added in v0.6.0

func (s *UsersService) RevokeImpersonationToken(user, token int, options ...RequestOptionFunc) (*Response, error)

RevokeImpersonationToken revokes an impersonation token.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#revoke-an-impersonation-token

func (*UsersService) SetUserStatus added in v0.39.1

func (s *UsersService) SetUserStatus(opt *UserStatusOptions, options ...RequestOptionFunc) (*UserStatus, *Response, error)

SetUserStatus sets the user's status

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#set-user-status

func (*UsersService) UnblockUser

func (s *UsersService) UnblockUser(user int, options ...RequestOptionFunc) error

UnblockUser unblocks the specified user. Available only for admin.

GitLab API docs: https://docs.gitlab.com/ce/api/users.html#unblock-user

type ValidateService added in v0.7.5

type ValidateService struct {
	// contains filtered or unexported fields
}

ValidateService handles communication with the validation related methods of the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/lint.html

func (*ValidateService) Lint added in v0.7.5

func (s *ValidateService) Lint(content string, options ...RequestOptionFunc) (*LintResult, *Response, error)

Lint validates .gitlab-ci.yml content.

GitLab API docs: https://docs.gitlab.com/ce/api/lint.html

type VariableTypeValue added in v0.39.1

type VariableTypeValue string

VariableTypeValue represents a variable type within GitLab.

GitLab API docs: https://docs.gitlab.com/ce/api/

const (
	EnvVariableType  VariableTypeValue = "env_var"
	FileVariableType VariableTypeValue = "file"
)

List of available variable types.

GitLab API docs: https://docs.gitlab.com/ce/api/

func VariableType added in v0.39.1

func VariableType(v VariableTypeValue) *VariableTypeValue

VariableType is a helper routine that allocates a new VariableTypeValue to store v and returns a pointer to it.

type VerifyRegisteredRunnerOptions added in v0.11.0

type VerifyRegisteredRunnerOptions struct {
	Token *string `url:"token" json:"token"`
}

VerifyRegisteredRunnerOptions represents the available VerifyRegisteredRunner() options.

GitLab API docs: https://docs.gitlab.com/ce/api/runners.html#verify-authentication-for-a-registered-runner

type Version added in v0.6.0

type Version struct {
	Version  string `json:"version"`
	Revision string `json:"revision"`
}

Version represents a GitLab instance version.

GitLab API docs: https://docs.gitlab.com/ce/api/version.md

func (Version) String added in v0.6.0

func (s Version) String() string

type VersionService added in v0.6.0

type VersionService struct {
	// contains filtered or unexported fields
}

VersionService handles communication with the GitLab server instance to retrieve its version information via the GitLab API.

GitLab API docs: https://docs.gitlab.com/ce/api/version.md

func (*VersionService) GetVersion added in v0.6.0

func (s *VersionService) GetVersion() (*Version, *Response, error)

GetVersion gets a GitLab server instance version; it is only available to authenticated users.

GitLab API docs: https://docs.gitlab.com/ce/api/version.md

type VisibilityValue added in v0.6.0

type VisibilityValue string

VisibilityValue represents a visibility level within GitLab.

GitLab API docs: https://docs.gitlab.com/ce/api/

const (
	PrivateVisibility  VisibilityValue = "private"
	InternalVisibility VisibilityValue = "internal"
	PublicVisibility   VisibilityValue = "public"
)

List of available visibility levels.

GitLab API docs: https://docs.gitlab.com/ce/api/

func Visibility added in v0.6.0

func Visibility(v VisibilityValue) *VisibilityValue

Visibility is a helper routine that allocates a new VisibilityValue to store v and returns a pointer to it.

type Wiki added in v0.7.0

type Wiki struct {
	Content string     `json:"content"`
	Format  WikiFormat `json:"format"`
	Slug    string     `json:"slug"`
	Title   string     `json:"title"`
}

Wiki represents a GitLab wiki.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html

func (Wiki) String added in v0.7.0

func (w Wiki) String() string

type WikiFormat added in v0.7.0

type WikiFormat string

WikiFormat represents the available wiki formats.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html

const (
	WikiFormatMarkdown WikiFormat = "markdown"
	WikiFormatRFoc     WikiFormat = "rdoc"
	WikiFormatASCIIDoc WikiFormat = "asciidoc"
)

The available wiki formats.

type WikiPageEvent added in v0.3.1

type WikiPageEvent struct {
	ObjectKind string `json:"object_kind"`
	User       *User  `json:"user"`
	Project    struct {
		Name              string          `json:"name"`
		Description       string          `json:"description"`
		AvatarURL         string          `json:"avatar_url"`
		GitSSHURL         string          `json:"git_ssh_url"`
		GitHTTPURL        string          `json:"git_http_url"`
		Namespace         string          `json:"namespace"`
		PathWithNamespace string          `json:"path_with_namespace"`
		DefaultBranch     string          `json:"default_branch"`
		Homepage          string          `json:"homepage"`
		URL               string          `json:"url"`
		SSHURL            string          `json:"ssh_url"`
		HTTPURL           string          `json:"http_url"`
		WebURL            string          `json:"web_url"`
		Visibility        VisibilityValue `json:"visibility"`
	} `json:"project"`
	Wiki struct {
		WebURL            string `json:"web_url"`
		GitSSHURL         string `json:"git_ssh_url"`
		GitHTTPURL        string `json:"git_http_url"`
		PathWithNamespace string `json:"path_with_namespace"`
		DefaultBranch     string `json:"default_branch"`
	} `json:"wiki"`
	ObjectAttributes struct {
		Title   string `json:"title"`
		Content string `json:"content"`
		Format  string `json:"format"`
		Message string `json:"message"`
		Slug    string `json:"slug"`
		URL     string `json:"url"`
		Action  string `json:"action"`
	} `json:"object_attributes"`
}

WikiPageEvent represents a wiki page event.

GitLab API docs: https://docs.gitlab.com/ce/user/project/integrations/webhooks.html#wiki-page-events

type WikisService added in v0.7.0

type WikisService struct {
	// contains filtered or unexported fields
}

WikisService handles communication with the wikis related methods of the Gitlab API.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html

func (*WikisService) CreateWikiPage added in v0.7.0

func (s *WikisService) CreateWikiPage(pid interface{}, opt *CreateWikiPageOptions, options ...RequestOptionFunc) (*Wiki, *Response, error)

CreateWikiPage creates a new wiki page for the given repository with the given title, slug, and content.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html#create-a-new-wiki-page

func (*WikisService) DeleteWikiPage added in v0.7.0

func (s *WikisService) DeleteWikiPage(pid interface{}, slug string, options ...RequestOptionFunc) (*Response, error)

DeleteWikiPage deletes a wiki page with a given slug.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html#delete-a-wiki-page

func (*WikisService) EditWikiPage added in v0.7.0

func (s *WikisService) EditWikiPage(pid interface{}, slug string, opt *EditWikiPageOptions, options ...RequestOptionFunc) (*Wiki, *Response, error)

EditWikiPage Updates an existing wiki page. At least one parameter is required to update the wiki page.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html#edit-an-existing-wiki-page

func (*WikisService) GetWikiPage added in v0.7.0

func (s *WikisService) GetWikiPage(pid interface{}, slug string, options ...RequestOptionFunc) (*Wiki, *Response, error)

GetWikiPage gets a wiki page for a given project.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html#get-a-wiki-page

func (*WikisService) ListWikis added in v0.7.0

func (s *WikisService) ListWikis(pid interface{}, opt *ListWikisOptions, options ...RequestOptionFunc) ([]*Wiki, *Response, error)

ListWikis lists all pages of the wiki of the given project id. When with_content is set, it also returns the content of the pages.

GitLab API docs: https://docs.gitlab.com/ce/api/wikis.html#list-wiki-pages

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL