Loading group_activity_analytics.go +13 −13 Original line number Diff line number Diff line Loading @@ -18,8 +18,21 @@ import "net/http" type ( GroupActivityAnalyticsServiceInterface interface { // GetRecentlyCreatedIssuesCount gets the count of recently created issues for a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-recently-created-issues-for-group GetRecentlyCreatedIssuesCount(opt *GetRecentlyCreatedIssuesCountOptions, options ...RequestOptionFunc) (*IssuesCount, *Response, error) // GetRecentlyCreatedMergeRequestsCount gets the count of recently created merge // requests for a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-recently-created-merge-requests-for-group GetRecentlyCreatedMergeRequestsCount(opt *GetRecentlyCreatedMergeRequestsCountOptions, options ...RequestOptionFunc) (*MergeRequestsCount, *Response, error) // GetRecentlyAddedMembersCount gets the count of recently added members to a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-members-recently-added-to-group GetRecentlyAddedMembersCount(opt *GetRecentlyAddedMembersCountOptions, options ...RequestOptionFunc) (*NewMembersCount, *Response, error) } Loading Loading @@ -51,10 +64,6 @@ type GetRecentlyCreatedIssuesCountOptions struct { GroupPath string `url:"group_path" json:"group_path"` } // GetRecentlyCreatedIssuesCount gets the count of recently created issues for a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-recently-created-issues-for-group func (s *GroupActivityAnalyticsService) GetRecentlyCreatedIssuesCount(opt *GetRecentlyCreatedIssuesCountOptions, options ...RequestOptionFunc) (*IssuesCount, *Response, error) { return do[*IssuesCount](s.client, withMethod(http.MethodGet), Loading Loading @@ -82,11 +91,6 @@ type GetRecentlyCreatedMergeRequestsCountOptions struct { GroupPath string `url:"group_path" json:"group_path"` } // GetRecentlyCreatedMergeRequestsCount gets the count of recently created merge // requests for a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-recently-created-merge-requests-for-group func (s *GroupActivityAnalyticsService) GetRecentlyCreatedMergeRequestsCount(opt *GetRecentlyCreatedMergeRequestsCountOptions, options ...RequestOptionFunc) (*MergeRequestsCount, *Response, error) { return do[*MergeRequestsCount](s.client, withMethod(http.MethodGet), Loading @@ -113,10 +117,6 @@ type GetRecentlyAddedMembersCountOptions struct { GroupPath string `url:"group_path" json:"group_path"` } // GetRecentlyAddedMembersCount gets the count of recently added members to a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-members-recently-added-to-group func (s *GroupActivityAnalyticsService) GetRecentlyAddedMembersCount(opt *GetRecentlyAddedMembersCountOptions, options ...RequestOptionFunc) (*NewMembersCount, *Response, error) { return do[*NewMembersCount](s.client, withMethod(http.MethodGet), Loading group_markdown_uploads.go +22 −22 Original line number Diff line number Diff line Loading @@ -22,10 +22,32 @@ import ( type ( GroupMarkdownUploadsServiceInterface interface { // ListGroupMarkdownUploads gets all markdown uploads for a group. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#list-uploads ListGroupMarkdownUploads(gid any, opt *ListMarkdownUploadsOptions, options ...RequestOptionFunc) ([]*GroupMarkdownUpload, *Response, error) // DownloadGroupMarkdownUploadByID downloads a specific upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#download-an-uploaded-file-by-id DownloadGroupMarkdownUploadByID(gid any, uploadID int64, options ...RequestOptionFunc) (io.Reader, *Response, error) // DownloadGroupMarkdownUploadBySecretAndFilename downloads a specific upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#download-an-uploaded-file-by-secret-and-filename DownloadGroupMarkdownUploadBySecretAndFilename(gid any, secret string, filename string, options ...RequestOptionFunc) (io.Reader, *Response, error) // DeleteGroupMarkdownUploadByID deletes an upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#delete-an-uploaded-file-by-id DeleteGroupMarkdownUploadByID(gid any, uploadID int64, options ...RequestOptionFunc) (*Response, error) // DeleteGroupMarkdownUploadBySecretAndFilename deletes an upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#delete-an-uploaded-file-by-secret-and-filename DeleteGroupMarkdownUploadBySecretAndFilename(gid any, secret string, filename string, options ...RequestOptionFunc) (*Response, error) } Loading @@ -46,18 +68,10 @@ type ( GroupMarkdownUpload = MarkdownUpload ) // ListGroupMarkdownUploads gets all markdown uploads for a group. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#list-uploads func (s *GroupMarkdownUploadsService) ListGroupMarkdownUploads(gid any, opt *ListMarkdownUploadsOptions, options ...RequestOptionFunc) ([]*GroupMarkdownUpload, *Response, error) { return listMarkdownUploads[GroupMarkdownUpload](s.client, GroupResource, GroupID{gid}, opt, options) } // DownloadGroupMarkdownUploadByID downloads a specific upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#download-an-uploaded-file-by-id func (s *GroupMarkdownUploadsService) DownloadGroupMarkdownUploadByID(gid any, uploadID int64, options ...RequestOptionFunc) (io.Reader, *Response, error) { buffer, resp, err := downloadMarkdownUploadByID(s.client, GroupResource, GroupID{gid}, uploadID, options) if err != nil { Loading @@ -66,11 +80,6 @@ func (s *GroupMarkdownUploadsService) DownloadGroupMarkdownUploadByID(gid any, u return buffer, resp, nil } // DownloadGroupMarkdownUploadBySecretAndFilename downloads a specific upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#download-an-uploaded-file-by-secret-and-filename func (s *GroupMarkdownUploadsService) DownloadGroupMarkdownUploadBySecretAndFilename(gid any, secret string, filename string, options ...RequestOptionFunc) (io.Reader, *Response, error) { buffer, resp, err := downloadMarkdownUploadBySecretAndFilename(s.client, GroupResource, GroupID{gid}, secret, filename, options) if err != nil { Loading @@ -79,19 +88,10 @@ func (s *GroupMarkdownUploadsService) DownloadGroupMarkdownUploadBySecretAndFile return buffer, resp, nil } // DeleteGroupMarkdownUploadByID deletes an upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#delete-an-uploaded-file-by-id func (s *GroupMarkdownUploadsService) DeleteGroupMarkdownUploadByID(gid any, uploadID int64, options ...RequestOptionFunc) (*Response, error) { return deleteMarkdownUploadByID(s.client, GroupResource, GroupID{gid}, uploadID, options) } // DeleteGroupMarkdownUploadBySecretAndFilename deletes an upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#delete-an-uploaded-file-by-secret-and-filename func (s *GroupMarkdownUploadsService) DeleteGroupMarkdownUploadBySecretAndFilename(gid any, secret string, filename string, options ...RequestOptionFunc) (*Response, error) { return deleteMarkdownUploadBySecretAndFilename(s.client, GroupResource, GroupID{gid}, secret, filename, options) } instance_variables.go +20 −21 Original line number Diff line number Diff line Loading @@ -24,10 +24,30 @@ import ( type ( InstanceVariablesServiceInterface interface { // ListVariables gets a list of all variables for an instance. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#list-all-instance-variables ListVariables(opt *ListInstanceVariablesOptions, options ...RequestOptionFunc) ([]*InstanceVariable, *Response, error) // GetVariable gets a variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#show-instance-variable-details GetVariable(key string, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) // CreateVariable creates a new instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#create-instance-variable CreateVariable(opt *CreateInstanceVariableOptions, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) // UpdateVariable updates an existing instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#update-instance-variable UpdateVariable(key string, opt *UpdateInstanceVariableOptions, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) // RemoveVariable removes an instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#remove-instance-variable RemoveVariable(key string, options ...RequestOptionFunc) (*Response, error) } Loading Loading @@ -70,10 +90,6 @@ type ListInstanceVariablesOptions struct { ListOptions } // ListVariables gets a list of all variables for an instance. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#list-all-instance-variables func (s *InstanceVariablesService) ListVariables(opt *ListInstanceVariablesOptions, options ...RequestOptionFunc) ([]*InstanceVariable, *Response, error) { u := "admin/ci/variables" Loading @@ -91,10 +107,6 @@ func (s *InstanceVariablesService) ListVariables(opt *ListInstanceVariablesOptio return vs, resp, nil } // GetVariable gets a variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#show-instance-variable-details func (s *InstanceVariablesService) GetVariable(key string, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) { u := fmt.Sprintf("admin/ci/variables/%s", url.PathEscape(key)) Loading Loading @@ -127,10 +139,6 @@ type CreateInstanceVariableOptions struct { VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` } // CreateVariable creates a new instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#create-instance-variable func (s *InstanceVariablesService) CreateVariable(opt *CreateInstanceVariableOptions, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) { u := "admin/ci/variables" Loading Loading @@ -162,11 +170,6 @@ type UpdateInstanceVariableOptions struct { VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` } // UpdateVariable updates the position of an existing // instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#update-instance-variable func (s *InstanceVariablesService) UpdateVariable(key string, opt *UpdateInstanceVariableOptions, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) { u := fmt.Sprintf("admin/ci/variables/%s", url.PathEscape(key)) Loading @@ -184,10 +187,6 @@ func (s *InstanceVariablesService) UpdateVariable(key string, opt *UpdateInstanc return v, resp, nil } // RemoveVariable removes an instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#remove-instance-variable func (s *InstanceVariablesService) RemoveVariable(key string, options ...RequestOptionFunc) (*Response, error) { u := fmt.Sprintf("admin/ci/variables/%s", url.PathEscape(key)) Loading project_markdown_uploads.go +26 −26 Original line number Diff line number Diff line Loading @@ -24,11 +24,37 @@ import ( type ( ProjectMarkdownUploadsServiceInterface interface { // UploadProjectMarkdown uploads a markdown file to a project. // // GitLab API docs: // https://docs.gitlab.com/api/project_markdown_uploads/#upload-a-file UploadProjectMarkdown(pid any, content io.Reader, filename string, options ...RequestOptionFunc) (*ProjectMarkdownUploadedFile, *Response, error) // ListProjectMarkdownUploads gets all markdown uploads for a project. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#list-uploads ListProjectMarkdownUploads(pid any, options ...RequestOptionFunc) ([]*ProjectMarkdownUpload, *Response, error) // DownloadProjectMarkdownUploadByID downloads a specific upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#download-an-uploaded-file-by-id DownloadProjectMarkdownUploadByID(pid any, uploadID int64, options ...RequestOptionFunc) ([]byte, *Response, error) // DownloadProjectMarkdownUploadBySecretAndFilename downloads a specific upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#download-an-uploaded-file-by-secret-and-filename DownloadProjectMarkdownUploadBySecretAndFilename(pid any, secret string, filename string, options ...RequestOptionFunc) ([]byte, *Response, error) // DeleteProjectMarkdownUploadByID deletes an upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#delete-an-uploaded-file-by-id DeleteProjectMarkdownUploadByID(pid any, uploadID int64, options ...RequestOptionFunc) (*Response, error) // DeleteProjectMarkdownUploadBySecretAndFilename deletes an upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#delete-an-uploaded-file-by-secret-and-filename DeleteProjectMarkdownUploadBySecretAndFilename(pid any, secret string, filename string, options ...RequestOptionFunc) (*Response, error) } Loading @@ -50,10 +76,6 @@ type ( ProjectMarkdownUploadedFile = MarkdownUploadedFile ) // UploadProjectMarkdown uploads a markdown file to a project. // // GitLab docs: // https://docs.gitlab.com/api/project_markdown_uploads/#upload-a-file func (s *ProjectMarkdownUploadsService) UploadProjectMarkdown(pid any, content io.Reader, filename string, options ...RequestOptionFunc) (*ProjectMarkdownUploadedFile, *Response, error) { project, err := parseID(pid) if err != nil { Loading Loading @@ -83,18 +105,10 @@ func (s *ProjectMarkdownUploadsService) UploadProjectMarkdown(pid any, content i return f, resp, nil } // ListProjectMarkdownUploads gets all markdown uploads for a project. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#list-uploads func (s *ProjectMarkdownUploadsService) ListProjectMarkdownUploads(pid any, options ...RequestOptionFunc) ([]*ProjectMarkdownUpload, *Response, error) { return listMarkdownUploads[ProjectMarkdownUpload](s.client, ProjectResource, ProjectID{pid}, nil, options) } // DownloadProjectMarkdownUploadByID downloads a specific upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#download-an-uploaded-file-by-id func (s *ProjectMarkdownUploadsService) DownloadProjectMarkdownUploadByID(pid any, uploadID int64, options ...RequestOptionFunc) ([]byte, *Response, error) { buffer, resp, err := downloadMarkdownUploadByID(s.client, ProjectResource, ProjectID{pid}, uploadID, options) if err != nil { Loading @@ -103,11 +117,6 @@ func (s *ProjectMarkdownUploadsService) DownloadProjectMarkdownUploadByID(pid an return buffer.Bytes(), resp, nil } // DownloadProjectMarkdownUploadBySecretAndFilename downloads a specific upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#download-an-uploaded-file-by-secret-and-filename func (s *ProjectMarkdownUploadsService) DownloadProjectMarkdownUploadBySecretAndFilename(pid any, secret string, filename string, options ...RequestOptionFunc) ([]byte, *Response, error) { buffer, resp, err := downloadMarkdownUploadBySecretAndFilename(s.client, ProjectResource, ProjectID{pid}, secret, filename, options) if err != nil { Loading @@ -116,19 +125,10 @@ func (s *ProjectMarkdownUploadsService) DownloadProjectMarkdownUploadBySecretAnd return buffer.Bytes(), resp, nil } // DeleteProjectMarkdownUploadByID deletes an upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#delete-an-uploaded-file-by-id func (s *ProjectMarkdownUploadsService) DeleteProjectMarkdownUploadByID(pid any, uploadID int64, options ...RequestOptionFunc) (*Response, error) { return deleteMarkdownUploadByID(s.client, ProjectResource, ProjectID{pid}, uploadID, options) } // DeleteProjectMarkdownUploadBySecretAndFilename deletes an upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#delete-an-uploaded-file-by-secret-and-filename func (s *ProjectMarkdownUploadsService) DeleteProjectMarkdownUploadBySecretAndFilename(pid any, secret string, filename string, options ...RequestOptionFunc) (*Response, error) { return deleteMarkdownUploadBySecretAndFilename(s.client, ProjectResource, ProjectID{pid}, secret, filename, options) } project_security_settings.go +9 −9 Original line number Diff line number Diff line Loading @@ -23,7 +23,16 @@ import ( type ( ProjectSecuritySettingsServiceInterface interface { // ListProjectSecuritySettings lists all of a project's security settings. // // GitLab API Docs: // https://docs.gitlab.com/api/project_security_settings/#list-project-security-settings ListProjectSecuritySettings(pid any, options ...RequestOptionFunc) (*ProjectSecuritySettings, *Response, error) // UpdateSecretPushProtectionEnabledSetting updates the secret_push_protection_enabled // setting for a project to the provided value. // // GitLab API Docs: // https://docs.gitlab.com/api/project_security_settings/#update-secret_push_protection_enabled-setting UpdateSecretPushProtectionEnabledSetting(pid any, opt UpdateProjectSecuritySettingsOptions, options ...RequestOptionFunc) (*ProjectSecuritySettings, *Response, error) } Loading Loading @@ -64,10 +73,6 @@ func (s ProjectSecuritySettings) String() string { return Stringify(s) } // ListProjectSecuritySettings lists all of a project's security settings. // // GitLab API Docs: // https://docs.gitlab.com/api/project_security_settings/#list-project-security-settings func (s *ProjectSecuritySettingsService) ListProjectSecuritySettings(pid any, options ...RequestOptionFunc) (*ProjectSecuritySettings, *Response, error) { project, err := parseID(pid) if err != nil { Loading Loading @@ -97,11 +102,6 @@ type UpdateProjectSecuritySettingsOptions struct { SecretPushProtectionEnabled *bool `url:"secret_push_protection_enabled,omitempty" json:"secret_push_protection_enabled,omitempty"` } // UpdateSecretPushProtectionEnabledSetting updates the secret_push_protection_enabled // setting for the all projects in a project to the provided value. // // GitLab API Docs: // https://docs.gitlab.com/api/project_security_settings/#update-secret_push_protection_enabled-setting func (s *ProjectSecuritySettingsService) UpdateSecretPushProtectionEnabledSetting(pid any, opt UpdateProjectSecuritySettingsOptions, options ...RequestOptionFunc) (*ProjectSecuritySettings, *Response, error) { project, err := parseID(pid) if err != nil { Loading Loading
group_activity_analytics.go +13 −13 Original line number Diff line number Diff line Loading @@ -18,8 +18,21 @@ import "net/http" type ( GroupActivityAnalyticsServiceInterface interface { // GetRecentlyCreatedIssuesCount gets the count of recently created issues for a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-recently-created-issues-for-group GetRecentlyCreatedIssuesCount(opt *GetRecentlyCreatedIssuesCountOptions, options ...RequestOptionFunc) (*IssuesCount, *Response, error) // GetRecentlyCreatedMergeRequestsCount gets the count of recently created merge // requests for a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-recently-created-merge-requests-for-group GetRecentlyCreatedMergeRequestsCount(opt *GetRecentlyCreatedMergeRequestsCountOptions, options ...RequestOptionFunc) (*MergeRequestsCount, *Response, error) // GetRecentlyAddedMembersCount gets the count of recently added members to a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-members-recently-added-to-group GetRecentlyAddedMembersCount(opt *GetRecentlyAddedMembersCountOptions, options ...RequestOptionFunc) (*NewMembersCount, *Response, error) } Loading Loading @@ -51,10 +64,6 @@ type GetRecentlyCreatedIssuesCountOptions struct { GroupPath string `url:"group_path" json:"group_path"` } // GetRecentlyCreatedIssuesCount gets the count of recently created issues for a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-recently-created-issues-for-group func (s *GroupActivityAnalyticsService) GetRecentlyCreatedIssuesCount(opt *GetRecentlyCreatedIssuesCountOptions, options ...RequestOptionFunc) (*IssuesCount, *Response, error) { return do[*IssuesCount](s.client, withMethod(http.MethodGet), Loading Loading @@ -82,11 +91,6 @@ type GetRecentlyCreatedMergeRequestsCountOptions struct { GroupPath string `url:"group_path" json:"group_path"` } // GetRecentlyCreatedMergeRequestsCount gets the count of recently created merge // requests for a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-recently-created-merge-requests-for-group func (s *GroupActivityAnalyticsService) GetRecentlyCreatedMergeRequestsCount(opt *GetRecentlyCreatedMergeRequestsCountOptions, options ...RequestOptionFunc) (*MergeRequestsCount, *Response, error) { return do[*MergeRequestsCount](s.client, withMethod(http.MethodGet), Loading @@ -113,10 +117,6 @@ type GetRecentlyAddedMembersCountOptions struct { GroupPath string `url:"group_path" json:"group_path"` } // GetRecentlyAddedMembersCount gets the count of recently added members to a group. // // GitLab API docs: // https://docs.gitlab.com/api/group_activity_analytics/#get-count-of-members-recently-added-to-group func (s *GroupActivityAnalyticsService) GetRecentlyAddedMembersCount(opt *GetRecentlyAddedMembersCountOptions, options ...RequestOptionFunc) (*NewMembersCount, *Response, error) { return do[*NewMembersCount](s.client, withMethod(http.MethodGet), Loading
group_markdown_uploads.go +22 −22 Original line number Diff line number Diff line Loading @@ -22,10 +22,32 @@ import ( type ( GroupMarkdownUploadsServiceInterface interface { // ListGroupMarkdownUploads gets all markdown uploads for a group. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#list-uploads ListGroupMarkdownUploads(gid any, opt *ListMarkdownUploadsOptions, options ...RequestOptionFunc) ([]*GroupMarkdownUpload, *Response, error) // DownloadGroupMarkdownUploadByID downloads a specific upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#download-an-uploaded-file-by-id DownloadGroupMarkdownUploadByID(gid any, uploadID int64, options ...RequestOptionFunc) (io.Reader, *Response, error) // DownloadGroupMarkdownUploadBySecretAndFilename downloads a specific upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#download-an-uploaded-file-by-secret-and-filename DownloadGroupMarkdownUploadBySecretAndFilename(gid any, secret string, filename string, options ...RequestOptionFunc) (io.Reader, *Response, error) // DeleteGroupMarkdownUploadByID deletes an upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#delete-an-uploaded-file-by-id DeleteGroupMarkdownUploadByID(gid any, uploadID int64, options ...RequestOptionFunc) (*Response, error) // DeleteGroupMarkdownUploadBySecretAndFilename deletes an upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#delete-an-uploaded-file-by-secret-and-filename DeleteGroupMarkdownUploadBySecretAndFilename(gid any, secret string, filename string, options ...RequestOptionFunc) (*Response, error) } Loading @@ -46,18 +68,10 @@ type ( GroupMarkdownUpload = MarkdownUpload ) // ListGroupMarkdownUploads gets all markdown uploads for a group. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#list-uploads func (s *GroupMarkdownUploadsService) ListGroupMarkdownUploads(gid any, opt *ListMarkdownUploadsOptions, options ...RequestOptionFunc) ([]*GroupMarkdownUpload, *Response, error) { return listMarkdownUploads[GroupMarkdownUpload](s.client, GroupResource, GroupID{gid}, opt, options) } // DownloadGroupMarkdownUploadByID downloads a specific upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#download-an-uploaded-file-by-id func (s *GroupMarkdownUploadsService) DownloadGroupMarkdownUploadByID(gid any, uploadID int64, options ...RequestOptionFunc) (io.Reader, *Response, error) { buffer, resp, err := downloadMarkdownUploadByID(s.client, GroupResource, GroupID{gid}, uploadID, options) if err != nil { Loading @@ -66,11 +80,6 @@ func (s *GroupMarkdownUploadsService) DownloadGroupMarkdownUploadByID(gid any, u return buffer, resp, nil } // DownloadGroupMarkdownUploadBySecretAndFilename downloads a specific upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#download-an-uploaded-file-by-secret-and-filename func (s *GroupMarkdownUploadsService) DownloadGroupMarkdownUploadBySecretAndFilename(gid any, secret string, filename string, options ...RequestOptionFunc) (io.Reader, *Response, error) { buffer, resp, err := downloadMarkdownUploadBySecretAndFilename(s.client, GroupResource, GroupID{gid}, secret, filename, options) if err != nil { Loading @@ -79,19 +88,10 @@ func (s *GroupMarkdownUploadsService) DownloadGroupMarkdownUploadBySecretAndFile return buffer, resp, nil } // DeleteGroupMarkdownUploadByID deletes an upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#delete-an-uploaded-file-by-id func (s *GroupMarkdownUploadsService) DeleteGroupMarkdownUploadByID(gid any, uploadID int64, options ...RequestOptionFunc) (*Response, error) { return deleteMarkdownUploadByID(s.client, GroupResource, GroupID{gid}, uploadID, options) } // DeleteGroupMarkdownUploadBySecretAndFilename deletes an upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/group_markdown_uploads/#delete-an-uploaded-file-by-secret-and-filename func (s *GroupMarkdownUploadsService) DeleteGroupMarkdownUploadBySecretAndFilename(gid any, secret string, filename string, options ...RequestOptionFunc) (*Response, error) { return deleteMarkdownUploadBySecretAndFilename(s.client, GroupResource, GroupID{gid}, secret, filename, options) }
instance_variables.go +20 −21 Original line number Diff line number Diff line Loading @@ -24,10 +24,30 @@ import ( type ( InstanceVariablesServiceInterface interface { // ListVariables gets a list of all variables for an instance. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#list-all-instance-variables ListVariables(opt *ListInstanceVariablesOptions, options ...RequestOptionFunc) ([]*InstanceVariable, *Response, error) // GetVariable gets a variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#show-instance-variable-details GetVariable(key string, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) // CreateVariable creates a new instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#create-instance-variable CreateVariable(opt *CreateInstanceVariableOptions, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) // UpdateVariable updates an existing instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#update-instance-variable UpdateVariable(key string, opt *UpdateInstanceVariableOptions, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) // RemoveVariable removes an instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#remove-instance-variable RemoveVariable(key string, options ...RequestOptionFunc) (*Response, error) } Loading Loading @@ -70,10 +90,6 @@ type ListInstanceVariablesOptions struct { ListOptions } // ListVariables gets a list of all variables for an instance. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#list-all-instance-variables func (s *InstanceVariablesService) ListVariables(opt *ListInstanceVariablesOptions, options ...RequestOptionFunc) ([]*InstanceVariable, *Response, error) { u := "admin/ci/variables" Loading @@ -91,10 +107,6 @@ func (s *InstanceVariablesService) ListVariables(opt *ListInstanceVariablesOptio return vs, resp, nil } // GetVariable gets a variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#show-instance-variable-details func (s *InstanceVariablesService) GetVariable(key string, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) { u := fmt.Sprintf("admin/ci/variables/%s", url.PathEscape(key)) Loading Loading @@ -127,10 +139,6 @@ type CreateInstanceVariableOptions struct { VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` } // CreateVariable creates a new instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#create-instance-variable func (s *InstanceVariablesService) CreateVariable(opt *CreateInstanceVariableOptions, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) { u := "admin/ci/variables" Loading Loading @@ -162,11 +170,6 @@ type UpdateInstanceVariableOptions struct { VariableType *VariableTypeValue `url:"variable_type,omitempty" json:"variable_type,omitempty"` } // UpdateVariable updates the position of an existing // instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#update-instance-variable func (s *InstanceVariablesService) UpdateVariable(key string, opt *UpdateInstanceVariableOptions, options ...RequestOptionFunc) (*InstanceVariable, *Response, error) { u := fmt.Sprintf("admin/ci/variables/%s", url.PathEscape(key)) Loading @@ -184,10 +187,6 @@ func (s *InstanceVariablesService) UpdateVariable(key string, opt *UpdateInstanc return v, resp, nil } // RemoveVariable removes an instance level CI variable. // // GitLab API docs: // https://docs.gitlab.com/api/instance_level_ci_variables/#remove-instance-variable func (s *InstanceVariablesService) RemoveVariable(key string, options ...RequestOptionFunc) (*Response, error) { u := fmt.Sprintf("admin/ci/variables/%s", url.PathEscape(key)) Loading
project_markdown_uploads.go +26 −26 Original line number Diff line number Diff line Loading @@ -24,11 +24,37 @@ import ( type ( ProjectMarkdownUploadsServiceInterface interface { // UploadProjectMarkdown uploads a markdown file to a project. // // GitLab API docs: // https://docs.gitlab.com/api/project_markdown_uploads/#upload-a-file UploadProjectMarkdown(pid any, content io.Reader, filename string, options ...RequestOptionFunc) (*ProjectMarkdownUploadedFile, *Response, error) // ListProjectMarkdownUploads gets all markdown uploads for a project. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#list-uploads ListProjectMarkdownUploads(pid any, options ...RequestOptionFunc) ([]*ProjectMarkdownUpload, *Response, error) // DownloadProjectMarkdownUploadByID downloads a specific upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#download-an-uploaded-file-by-id DownloadProjectMarkdownUploadByID(pid any, uploadID int64, options ...RequestOptionFunc) ([]byte, *Response, error) // DownloadProjectMarkdownUploadBySecretAndFilename downloads a specific upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#download-an-uploaded-file-by-secret-and-filename DownloadProjectMarkdownUploadBySecretAndFilename(pid any, secret string, filename string, options ...RequestOptionFunc) ([]byte, *Response, error) // DeleteProjectMarkdownUploadByID deletes an upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#delete-an-uploaded-file-by-id DeleteProjectMarkdownUploadByID(pid any, uploadID int64, options ...RequestOptionFunc) (*Response, error) // DeleteProjectMarkdownUploadBySecretAndFilename deletes an upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#delete-an-uploaded-file-by-secret-and-filename DeleteProjectMarkdownUploadBySecretAndFilename(pid any, secret string, filename string, options ...RequestOptionFunc) (*Response, error) } Loading @@ -50,10 +76,6 @@ type ( ProjectMarkdownUploadedFile = MarkdownUploadedFile ) // UploadProjectMarkdown uploads a markdown file to a project. // // GitLab docs: // https://docs.gitlab.com/api/project_markdown_uploads/#upload-a-file func (s *ProjectMarkdownUploadsService) UploadProjectMarkdown(pid any, content io.Reader, filename string, options ...RequestOptionFunc) (*ProjectMarkdownUploadedFile, *Response, error) { project, err := parseID(pid) if err != nil { Loading Loading @@ -83,18 +105,10 @@ func (s *ProjectMarkdownUploadsService) UploadProjectMarkdown(pid any, content i return f, resp, nil } // ListProjectMarkdownUploads gets all markdown uploads for a project. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#list-uploads func (s *ProjectMarkdownUploadsService) ListProjectMarkdownUploads(pid any, options ...RequestOptionFunc) ([]*ProjectMarkdownUpload, *Response, error) { return listMarkdownUploads[ProjectMarkdownUpload](s.client, ProjectResource, ProjectID{pid}, nil, options) } // DownloadProjectMarkdownUploadByID downloads a specific upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#download-an-uploaded-file-by-id func (s *ProjectMarkdownUploadsService) DownloadProjectMarkdownUploadByID(pid any, uploadID int64, options ...RequestOptionFunc) ([]byte, *Response, error) { buffer, resp, err := downloadMarkdownUploadByID(s.client, ProjectResource, ProjectID{pid}, uploadID, options) if err != nil { Loading @@ -103,11 +117,6 @@ func (s *ProjectMarkdownUploadsService) DownloadProjectMarkdownUploadByID(pid an return buffer.Bytes(), resp, nil } // DownloadProjectMarkdownUploadBySecretAndFilename downloads a specific upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#download-an-uploaded-file-by-secret-and-filename func (s *ProjectMarkdownUploadsService) DownloadProjectMarkdownUploadBySecretAndFilename(pid any, secret string, filename string, options ...RequestOptionFunc) ([]byte, *Response, error) { buffer, resp, err := downloadMarkdownUploadBySecretAndFilename(s.client, ProjectResource, ProjectID{pid}, secret, filename, options) if err != nil { Loading @@ -116,19 +125,10 @@ func (s *ProjectMarkdownUploadsService) DownloadProjectMarkdownUploadBySecretAnd return buffer.Bytes(), resp, nil } // DeleteProjectMarkdownUploadByID deletes an upload by ID. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#delete-an-uploaded-file-by-id func (s *ProjectMarkdownUploadsService) DeleteProjectMarkdownUploadByID(pid any, uploadID int64, options ...RequestOptionFunc) (*Response, error) { return deleteMarkdownUploadByID(s.client, ProjectResource, ProjectID{pid}, uploadID, options) } // DeleteProjectMarkdownUploadBySecretAndFilename deletes an upload // by secret and filename. // // GitLab API Docs: // https://docs.gitlab.com/api/project_markdown_uploads/#delete-an-uploaded-file-by-secret-and-filename func (s *ProjectMarkdownUploadsService) DeleteProjectMarkdownUploadBySecretAndFilename(pid any, secret string, filename string, options ...RequestOptionFunc) (*Response, error) { return deleteMarkdownUploadBySecretAndFilename(s.client, ProjectResource, ProjectID{pid}, secret, filename, options) }
project_security_settings.go +9 −9 Original line number Diff line number Diff line Loading @@ -23,7 +23,16 @@ import ( type ( ProjectSecuritySettingsServiceInterface interface { // ListProjectSecuritySettings lists all of a project's security settings. // // GitLab API Docs: // https://docs.gitlab.com/api/project_security_settings/#list-project-security-settings ListProjectSecuritySettings(pid any, options ...RequestOptionFunc) (*ProjectSecuritySettings, *Response, error) // UpdateSecretPushProtectionEnabledSetting updates the secret_push_protection_enabled // setting for a project to the provided value. // // GitLab API Docs: // https://docs.gitlab.com/api/project_security_settings/#update-secret_push_protection_enabled-setting UpdateSecretPushProtectionEnabledSetting(pid any, opt UpdateProjectSecuritySettingsOptions, options ...RequestOptionFunc) (*ProjectSecuritySettings, *Response, error) } Loading Loading @@ -64,10 +73,6 @@ func (s ProjectSecuritySettings) String() string { return Stringify(s) } // ListProjectSecuritySettings lists all of a project's security settings. // // GitLab API Docs: // https://docs.gitlab.com/api/project_security_settings/#list-project-security-settings func (s *ProjectSecuritySettingsService) ListProjectSecuritySettings(pid any, options ...RequestOptionFunc) (*ProjectSecuritySettings, *Response, error) { project, err := parseID(pid) if err != nil { Loading Loading @@ -97,11 +102,6 @@ type UpdateProjectSecuritySettingsOptions struct { SecretPushProtectionEnabled *bool `url:"secret_push_protection_enabled,omitempty" json:"secret_push_protection_enabled,omitempty"` } // UpdateSecretPushProtectionEnabledSetting updates the secret_push_protection_enabled // setting for the all projects in a project to the provided value. // // GitLab API Docs: // https://docs.gitlab.com/api/project_security_settings/#update-secret_push_protection_enabled-setting func (s *ProjectSecuritySettingsService) UpdateSecretPushProtectionEnabledSetting(pid any, opt UpdateProjectSecuritySettingsOptions, options ...RequestOptionFunc) (*ProjectSecuritySettings, *Response, error) { project, err := parseID(pid) if err != nil { Loading