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
3159fab2
Commit
3159fab2
authored
Dec 03, 2015
by
Gabor Pipicz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add json tags for fields of request options
parent
85256a6b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
30 deletions
+30
-30
gitlab.go
gitlab.go
+2
-2
namespaces.go
namespaces.go
+2
-2
services.go
services.go
+10
-10
settings.go
settings.go
+16
-16
No files found.
gitlab.go
View file @
3159fab2
...
@@ -125,10 +125,10 @@ type Client struct {
...
@@ -125,10 +125,10 @@ type Client struct {
// support pagination.
// support pagination.
type
ListOptions
struct
{
type
ListOptions
struct
{
// For paginated result sets, page of results to retrieve.
// For paginated result sets, page of results to retrieve.
Page
int
`url:"page,omitempty"`
Page
int
`url:"page,omitempty"
json:"page,omitempty"
`
// For paginated result sets, the number of results to include per page.
// For paginated result sets, the number of results to include per page.
PerPage
int
`url:"per_page,omitempty"`
PerPage
int
`url:"per_page,omitempty"
json:"per_page,omitempty"
`
}
}
// NewClient returns a new GitLab API client. If a nil httpClient is
// NewClient returns a new GitLab API client. If a nil httpClient is
...
...
namespaces.go
View file @
3159fab2
...
@@ -42,7 +42,7 @@ func (n Namespace) String() string {
...
@@ -42,7 +42,7 @@ func (n Namespace) String() string {
// GitLab API docs: http://doc.gitlab.com/ce/api/namespaces.html#list-namespaces
// GitLab API docs: http://doc.gitlab.com/ce/api/namespaces.html#list-namespaces
type
ListNamespacesOptions
struct
{
type
ListNamespacesOptions
struct
{
ListOptions
ListOptions
Search
string
`url:"search,omitempty"`
Search
string
`url:"search,omitempty"
json:"search,omitempty"
`
}
}
// ListNamespaces gets a list of projects accessible by the authenticated user.
// ListNamespaces gets a list of projects accessible by the authenticated user.
...
@@ -70,7 +70,7 @@ func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions) ([]*Names
...
@@ -70,7 +70,7 @@ func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions) ([]*Names
// http://doc.gitlab.com/ce/api/namespaces.html#search-for-namespace
// http://doc.gitlab.com/ce/api/namespaces.html#search-for-namespace
func
(
s
*
NamespacesService
)
SearchNamespace
(
query
string
)
([]
*
Namespace
,
*
Response
,
error
)
{
func
(
s
*
NamespacesService
)
SearchNamespace
(
query
string
)
([]
*
Namespace
,
*
Response
,
error
)
{
var
q
struct
{
var
q
struct
{
Search
string
`url:"search,omitempty"`
Search
string
`url:"search,omitempty"
json:"search,omitempty"
`
}
}
q
.
Search
=
query
q
.
Search
=
query
...
...
services.go
View file @
3159fab2
...
@@ -49,8 +49,8 @@ type Service struct {
...
@@ -49,8 +49,8 @@ type Service struct {
// GitLab API docs:
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-gitlab-ci-service
// http://doc.gitlab.com/ce/api/services.html#edit-gitlab-ci-service
type
SetGitLabCIServiceOptions
struct
{
type
SetGitLabCIServiceOptions
struct
{
Token
string
`url:"token,omitempty"`
Token
string
`url:"token,omitempty"
json:"token,omitempty"
`
ProjectURL
string
`url:"project_url,omitempty"`
ProjectURL
string
`url:"project_url,omitempty"
json:"project_url,omitempty"
`
}
}
// SetGitLabCIService sets GitLab CI service for a project.
// SetGitLabCIService sets GitLab CI service for a project.
...
@@ -109,8 +109,8 @@ func (s *ServicesService) DeleteGitLabCIService(pid interface{}) (*Response, err
...
@@ -109,8 +109,8 @@ func (s *ServicesService) DeleteGitLabCIService(pid interface{}) (*Response, err
// GitLab API docs:
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#edit-hipchat-service
// http://doc.gitlab.com/ce/api/services.html#edit-hipchat-service
type
SetHipChatServiceOptions
struct
{
type
SetHipChatServiceOptions
struct
{
Token
string
`url:"token,omitempty"`
Token
string
`url:"token,omitempty"
json:"token,omitempty"
`
Room
string
`url:"room,omitempty"`
Room
string
`url:"room,omitempty"
json:"room,omitempty"
`
}
}
// SetHipChatService sets HipChat service for a project
// SetHipChatService sets HipChat service for a project
...
@@ -169,9 +169,9 @@ func (s *ServicesService) DeleteHipChatService(pid interface{}) (*Response, erro
...
@@ -169,9 +169,9 @@ func (s *ServicesService) DeleteHipChatService(pid interface{}) (*Response, erro
// GitLab API docs:
// GitLab API docs:
// http://doc.gitlab.com/ce/api/services.html#createedit-drone-ci-service
// http://doc.gitlab.com/ce/api/services.html#createedit-drone-ci-service
type
SetDroneCIServiceOptions
struct
{
type
SetDroneCIServiceOptions
struct
{
Token
string
`url:"token"`
Token
string
`url:"token"
json:"token"
`
DroneURL
string
`url:"drone_url"`
DroneURL
string
`url:"drone_url"
json:"drone_url"
`
EnableSSLVerification
string
`url:"enable_ssl_verification,omitempty"`
EnableSSLVerification
string
`url:"enable_ssl_verification,omitempty"
json:"enable_ssl_verification,omitempty"
`
}
}
// SetDroneCIService sets Drone CI service for a project.
// SetDroneCIService sets Drone CI service for a project.
...
@@ -226,9 +226,9 @@ func (s *ServicesService) DeleteDroneCIService(pid interface{}) (*Response, erro
...
@@ -226,9 +226,9 @@ func (s *ServicesService) DeleteDroneCIService(pid interface{}) (*Response, erro
// DroneCIServiceProperties represents Drone CI specific properties.
// DroneCIServiceProperties represents Drone CI specific properties.
type
DroneCIServiceProperties
struct
{
type
DroneCIServiceProperties
struct
{
Token
*
string
`url:"token"`
Token
*
string
`url:"token"
json:"token"
`
DroneURL
*
string
`url:"drone_url"`
DroneURL
*
string
`url:"drone_url"
json:"drone_url"
`
EnableSSLVerification
*
string
`url:"enable_ssl_verification"`
EnableSSLVerification
*
string
`url:"enable_ssl_verification"
json:"enable_ssl_verification"
`
}
}
// DroneCIService represents Drone CI service settings.
// DroneCIService represents Drone CI service settings.
...
...
settings.go
View file @
3159fab2
...
@@ -79,22 +79,22 @@ func (s *SettingsService) GetSettings() (*Settings, *Response, error) {
...
@@ -79,22 +79,22 @@ func (s *SettingsService) GetSettings() (*Settings, *Response, error) {
// GitLab API docs:
// GitLab API docs:
// http://doc.gitlab.com/ce/api/settings.html#change-application.settings
// http://doc.gitlab.com/ce/api/settings.html#change-application.settings
type
UpdateSettingsOptions
struct
{
type
UpdateSettingsOptions
struct
{
DefaultProjectsLimit
int
`url:"default_projects_limit,omitempty"`
DefaultProjectsLimit
int
`url:"default_projects_limit,omitempty"
json:"default_projects_limit,omitempty"
`
SignupEnabled
bool
`url:"signup_enabled,omitempty"`
SignupEnabled
bool
`url:"signup_enabled,omitempty"
json:"signup_enabled,omitempty"
`
SigninEnabled
bool
`url:"signin_enabled,omitempty"`
SigninEnabled
bool
`url:"signin_enabled,omitempty"
json:"signin_enabled,omitempty"
`
GravatarEnabled
bool
`url:"gravatar_enabled,omitempty"`
GravatarEnabled
bool
`url:"gravatar_enabled,omitempty"
json:"gravatar_enabled,omitempty"
`
SignInText
string
`url:"sign_in_text,omitempty"`
SignInText
string
`url:"sign_in_text,omitempty"
json:"sign_in_text,omitempty"
`
HomePageURL
string
`url:"home_page_url,omitempty"`
HomePageURL
string
`url:"home_page_url,omitempty"
json:"home_page_url,omitempty"
`
DefaultBranchProtection
int
`url:"default_branch_protection,omitempty"`
DefaultBranchProtection
int
`url:"default_branch_protection,omitempty"
json:"default_branch_protection,omitempty"
`
TwitterSharingEnabled
bool
`url:"twitter_sharing_enabled,omitempty"`
TwitterSharingEnabled
bool
`url:"twitter_sharing_enabled,omitempty"
json:"twitter_sharing_enabled,omitempty"
`
RestrictedVisibilityLevels
[]
VisibilityLevel
`url:"restricted_visibility_levels,omitempty"`
RestrictedVisibilityLevels
[]
VisibilityLevel
`url:"restricted_visibility_levels,omitempty"
json:"restricted_visibility_levels,omitempty"
`
MaxAttachmentSize
int
`url:"max_attachment_size,omitempty"`
MaxAttachmentSize
int
`url:"max_attachment_size,omitempty"
json:"max_attachment_size,omitempty"
`
SessionExpireDelay
int
`url:"session_expire_delay,omitempty"`
SessionExpireDelay
int
`url:"session_expire_delay,omitempty"
json:"session_expire_delay,omitempty"
`
DefaultProjectVisibility
int
`url:"default_project_visibility,omitempty"`
DefaultProjectVisibility
int
`url:"default_project_visibility,omitempty"
json:"default_project_visibility,omitempty"
`
DefaultSnippetVisibility
int
`url:"default_snippet_visibility,omitempty"`
DefaultSnippetVisibility
int
`url:"default_snippet_visibility,omitempty"
json:"default_snippet_visibility,omitempty"
`
RestrictedSignupDomains
[]
string
`url:"restricted_signup_domains,omitempty"`
RestrictedSignupDomains
[]
string
`url:"restricted_signup_domains,omitempty"
json:"restricted_signup_domains,omitempty"
`
UserOauthApplications
bool
`url:"user_oauth_applications,omitempty"`
UserOauthApplications
bool
`url:"user_oauth_applications,omitempty"
json:"user_oauth_applications,omitempty"
`
AfterSignOutPath
string
`url:"after_sign_out_path,omitempty"`
AfterSignOutPath
string
`url:"after_sign_out_path,omitempty"
json:"after_sign_out_path,omitempty"
`
}
}
// UpdateSettings updates the application settings.
// UpdateSettings updates the application settings.
...
...
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