Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
92d67d22
Commit
92d67d22
authored
Jan 08, 2019
by
Sander van Harmelen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweak the new protected tags code just a little
parent
3ccedfbb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
protected_tags.go
protected_tags.go
+17
-13
No files found.
protected_tags.go
View file @
92d67d22
...
...
@@ -5,7 +5,8 @@ import (
"net/url"
)
// ProtectedTagsService handles the protected tag methods of the GitLab API.
// ProtectedTagsService handles communication with the protected tag methods
// of the GitLab API.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html
...
...
@@ -13,25 +14,26 @@ type ProtectedTagsService struct {
client
*
Client
}
//
TagAccessDescription reperesents the access decription for
a protected tag.
//
ProtectedTag represents
a protected tag.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html
type
TagAccessDescription
struct
{
AccessLevel
AccessLevelValue
`json:"access_level
"`
AccessLevelDescription
string
`json:"access_level_description
"`
type
ProtectedTag
struct
{
Name
string
`json:"name
"`
CreateAccessLevels
[]
*
TagAccessDescription
`json:"create_access_levels
"`
}
//
ProtectedTag represents
a protected tag.
//
TagAccessDescription reperesents the access decription for
a protected tag.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html
type
ProtectedTag
struct
{
Name
string
`json:"name
"`
CreateAccessLevels
[]
*
TagAccessDescription
`json:"create_access_levels
"`
type
TagAccessDescription
struct
{
AccessLevel
AccessLevelValue
`json:"access_level
"`
AccessLevelDescription
string
`json:"access_level_description
"`
}
// ListProtectedTagsOptions represents available ListProtectedTags() options.
// ListProtectedTagsOptions represents the available ListProtectedTags()
// options.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html#list-protected-tags
...
...
@@ -87,7 +89,7 @@ func (s *ProtectedTagsService) GetProtectedTag(pid interface{}, tag string, opti
return
pt
,
resp
,
err
}
// ProtectRepositoryTagsOptions represents available ProtectRepositoryTags()
// ProtectRepositoryTagsOptions represents
the
available ProtectRepositoryTags()
// options.
//
// GitLab API docs:
...
...
@@ -97,7 +99,8 @@ type ProtectRepositoryTagsOptions struct {
CreateAccessLevel
*
AccessLevelValue
`url:"create_access_level,omitempty" json:"create_access_level,omitempty"`
}
// ProtectRepositoryTags protects a single tag or a wildcard tag.
// ProtectRepositoryTags protects a single repository tag or several project
// repository tags using a wildcard protected tag.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html#protect-repository-tags
...
...
@@ -122,7 +125,8 @@ func (s *ProtectedTagsService) ProtectRepositoryTags(pid interface{}, opt *Prote
return
pt
,
resp
,
err
}
// UnprotectRepositoryTags unprotects the given tag or wildcard tag.
// UnprotectRepositoryTags unprotects the given protected tag or wildcard
// protected tag.
//
// GitLab API docs:
// https://docs.gitlab.com/ee/api/protected_tags.html#unprotect-repository-tags
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment