Back to godoc.org
github.com/xanzy/go-gitlab

Package gitlab

v0.39.0
Latest Go to latest

The highest tagged major version is .

Published: today | License: Apache-2.0 | Module: github.com/xanzy/go-gitlab

Overview

Package gitlab implements a GitLab API client.

Index

Variables

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.

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

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

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

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

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.

type AcceptMergeRequestOptions

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

type BadgeKind string

BadgeKind represents a GitLab Badge Kind

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

all possible values Badge Kind

type BaseSystemEvent

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

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

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

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

func (b BoardList) String() string

type BoolValue

type BoolValue bool

BoolValue is a boolean value with advanced json unmarshaling features.

func (*BoolValue) UnmarshalJSON

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

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

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 BroadcastMessage

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

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

func (s *BroadcastMessagesService) CreateBroadcastMessage(opt *CreateBroadcastMessageOptions, options ...RequestOptionFunc) (*BroadcastMessage, *Response, error)

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

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

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

func (s *BroadcastMessagesService) ListBroadcastMessages(opt *ListBroadcastMessagesOptions, options ...RequestOptionFunc) ([]*BroadcastMessage, *Response, error)

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

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

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

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

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

type CIYMLTemplate

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

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

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

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

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

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 `url:"disable_overriding_approvers_per_merge_request,omitempty" json:"disable_overriding_approvers_per_merge_request,omitempty"`
	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

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

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

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

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 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

type ClientOptionFunc func(*Client) error

ClientOptionFunc can be used customize a new GitLab API client.

func WithBaseURL

func WithBaseURL(urlStr string) ClientOptionFunc

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

func WithCustomBackoff

func WithCustomBackoff(backoff retryablehttp.Backoff) ClientOptionFunc

WithCustomBackoff can be used to configure a custom backoff policy.

func WithCustomLimiter

func WithCustomLimiter(limiter RateLimiter) ClientOptionFunc

WithCustomLimiter injects a custom rate limiter to the client.

func WithCustomRetry

func WithCustomRetry(checkRetry retryablehttp.CheckRetry) ClientOptionFunc

WithCustomRetry can be used to configure a custom retry policy.

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) ClientOptionFunc

WithHTTPClient can be used to configure a custom HTTP client.

func WithoutRetries

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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"`

	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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

func (k DeployToken) String() string

type