summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/xanzy/go-gitlab/snippets.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2020-04-19 22:23:05 +0200
committerGitHub <noreply@github.com>2020-04-19 21:23:05 +0100
commit82dbb34c9c2d0efa8eeb8df845ee3e283024b1d6 (patch)
tree45f81306d304a30be114187b72bdfd3e1be18e6e /vendor/github.com/xanzy/go-gitlab/snippets.go
parent5c092eb0ef9347e88db59618902781e099880196 (diff)
downloadgitea-82dbb34c9c2d0efa8eeb8df845ee3e283024b1d6.tar.gz
gitea-82dbb34c9c2d0efa8eeb8df845ee3e283024b1d6.zip
Vendor Update: go-gitlab v0.22.1 -> v0.31.0 (#11136)
* vendor update: go-gitlab to v0.31.0 * migrate client init to v0.31.0 * refactor
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/snippets.go')
-rw-r--r--vendor/github.com/xanzy/go-gitlab/snippets.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/snippets.go b/vendor/github.com/xanzy/go-gitlab/snippets.go
index be232c8c2b..a8025de48d 100644
--- a/vendor/github.com/xanzy/go-gitlab/snippets.go
+++ b/vendor/github.com/xanzy/go-gitlab/snippets.go
@@ -64,7 +64,7 @@ type ListSnippetsOptions ListOptions
// ListSnippets gets a list of snippets.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/snippets.html#list-snippets
-func (s *SnippetsService) ListSnippets(opt *ListSnippetsOptions, options ...OptionFunc) ([]*Snippet, *Response, error) {
+func (s *SnippetsService) ListSnippets(opt *ListSnippetsOptions, options ...RequestOptionFunc) ([]*Snippet, *Response, error) {
req, err := s.client.NewRequest("GET", "snippets", opt, options)
if err != nil {
return nil, nil, err
@@ -83,7 +83,7 @@ func (s *SnippetsService) ListSnippets(opt *ListSnippetsOptions, options ...Opti
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/snippets.html#single-snippet
-func (s *SnippetsService) GetSnippet(snippet int, options ...OptionFunc) (*Snippet, *Response, error) {
+func (s *SnippetsService) GetSnippet(snippet int, options ...RequestOptionFunc) (*Snippet, *Response, error) {
u := fmt.Sprintf("snippets/%d", snippet)
req, err := s.client.NewRequest("GET", u, nil, options)
@@ -117,7 +117,7 @@ type CreateSnippetOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/snippets.html#create-new-snippet
-func (s *SnippetsService) CreateSnippet(opt *CreateSnippetOptions, options ...OptionFunc) (*Snippet, *Response, error) {
+func (s *SnippetsService) CreateSnippet(opt *CreateSnippetOptions, options ...RequestOptionFunc) (*Snippet, *Response, error) {
req, err := s.client.NewRequest("POST", "snippets", opt, options)
if err != nil {
return nil, nil, err
@@ -149,7 +149,7 @@ type UpdateSnippetOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/snippets.html#update-snippet
-func (s *SnippetsService) UpdateSnippet(snippet int, opt *UpdateSnippetOptions, options ...OptionFunc) (*Snippet, *Response, error) {
+func (s *SnippetsService) UpdateSnippet(snippet int, opt *UpdateSnippetOptions, options ...RequestOptionFunc) (*Snippet, *Response, error) {
u := fmt.Sprintf("snippets/%d", snippet)
req, err := s.client.NewRequest("PUT", u, opt, options)
@@ -172,7 +172,7 @@ func (s *SnippetsService) UpdateSnippet(snippet int, opt *UpdateSnippetOptions,
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/snippets.html#delete-snippet
-func (s *SnippetsService) DeleteSnippet(snippet int, options ...OptionFunc) (*Response, error) {
+func (s *SnippetsService) DeleteSnippet(snippet int, options ...RequestOptionFunc) (*Response, error) {
u := fmt.Sprintf("snippets/%d", snippet)
req, err := s.client.NewRequest("DELETE", u, nil, options)
@@ -187,7 +187,7 @@ func (s *SnippetsService) DeleteSnippet(snippet int, options ...OptionFunc) (*Re
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/snippets.html#snippet-content
-func (s *SnippetsService) SnippetContent(snippet int, options ...OptionFunc) ([]byte, *Response, error) {
+func (s *SnippetsService) SnippetContent(snippet int, options ...RequestOptionFunc) ([]byte, *Response, error) {
u := fmt.Sprintf("snippets/%d/raw", snippet)
req, err := s.client.NewRequest("GET", u, nil, options)
@@ -214,7 +214,7 @@ type ExploreSnippetsOptions ListOptions
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/snippets.html#explore-all-public-snippets
-func (s *SnippetsService) ExploreSnippets(opt *ExploreSnippetsOptions, options ...OptionFunc) ([]*Snippet, *Response, error) {
+func (s *SnippetsService) ExploreSnippets(opt *ExploreSnippetsOptions, options ...RequestOptionFunc) ([]*Snippet, *Response, error) {
req, err := s.client.NewRequest("GET", "snippets/public", nil, options)
if err != nil {
return nil, nil, err