Commit fdacf2f6 authored by Sander van Harmelen's avatar Sander van Harmelen Committed by GitHub

Add VisibilityLevel to CreateGroupOptions (#61)

parent 26db54c6
......@@ -31,7 +31,7 @@ import (
)
const (
libraryVersion = "0.1"
libraryVersion = "0.1.1"
defaultBaseURL = "https://gitlab.com/api/v3/"
userAgent = "go-gitlab/" + libraryVersion
)
......@@ -67,12 +67,12 @@ const (
// NotificationLevel represents a notification level within Gitlab.
//
// GitLab API docs: http://doc.gitlab.com/ce/...?
// GitLab API docs: http://doc.gitlab.com/ce/api/
type NotificationLevel int
// List of available notification levels
//
// GitLab API docs: http://doc.gitlab.com/ce/...?
// GitLab API docs: http://doc.gitlab.com/ce/api/
const (
DisabledNotifications NotificationLevel = iota
ParticipatingNotifications
......@@ -83,12 +83,12 @@ const (
// VisibilityLevel represents a visibility level within GitLab.
//
// GitLab API docs: http://doc.gitlab.com/ce/...?
// GitLab API docs: http://doc.gitlab.com/ce/api/
type VisibilityLevel int
// List of available visibility levels
//
// GitLab API docs: http://doc.gitlab.com/ce/...?
// GitLab API docs: http://doc.gitlab.com/ce/api/
const (
PrivateVisibility VisibilityLevel = 0
InternalVisibility VisibilityLevel = 10
......
......@@ -98,6 +98,12 @@ 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"`
// TODO (SvH) This should have the `omitempty` tag, but until issue #29
// is implemented, there is no clean way of adding those tags and still
// being able to define private groups (as the visibility level for that
// is 0 and so it would be omitted defaulting to a public group instead).
VisibilityLevel VisibilityLevel `url:"visibility_level" json:"visibility_level"`
}
// CreateGroup creates a new project group. Available only for users who can
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment