|  | 
|  | 1 | +package structs | 
|  | 2 | + | 
|  | 3 | +// Group represents a group of repositories and subgroups in an organization | 
|  | 4 | +// swagger:model | 
|  | 5 | +type Group struct { | 
|  | 6 | +	ID            int64  `json:"id"` | 
|  | 7 | +	Owner         *User  `json:"owner"` | 
|  | 8 | +	Name          string `json:"name"` | 
|  | 9 | +	Description   string `json:"description"` | 
|  | 10 | +	ParentGroupID int64  `json:"parentGroupID"` | 
|  | 11 | +	NumRepos      int64  `json:"num_repos"` | 
|  | 12 | +	NumSubgroups  int64  `json:"num_subgroups"` | 
|  | 13 | +	Link          string `json:"link"` | 
|  | 14 | +	SortOrder     int    `json:"sort_order"` | 
|  | 15 | +} | 
|  | 16 | + | 
|  | 17 | +// NewGroupOption - options for creating a new group in an organization | 
|  | 18 | +// swagger:model | 
|  | 19 | +type NewGroupOption struct { | 
|  | 20 | +	// the name for the newly created group | 
|  | 21 | +	// | 
|  | 22 | +	// required: true | 
|  | 23 | +	Name string `json:"name" binding:"Required"` | 
|  | 24 | +	// the description of the newly created group | 
|  | 25 | +	Description string `json:"description"` | 
|  | 26 | +	// the visibility of the newly created group | 
|  | 27 | +	Visibility VisibleType `json:"visibility"` | 
|  | 28 | +} | 
|  | 29 | + | 
|  | 30 | +// MoveGroupOption - options for changing a group's parent and sort order | 
|  | 31 | +// swagger:model | 
|  | 32 | +type MoveGroupOption struct { | 
|  | 33 | +	// the new parent group. can be 0 to specify no parent | 
|  | 34 | +	// | 
|  | 35 | +	// required: true | 
|  | 36 | +	NewParent int64 `json:"newParent" binding:"Required"` | 
|  | 37 | +	// the position of this group in its new parent | 
|  | 38 | +	NewPos *int `json:"newPos,omitempty"` | 
|  | 39 | +} | 
|  | 40 | + | 
|  | 41 | +// EditGroupOption - options for editing a repository group | 
|  | 42 | +// swagger:model | 
|  | 43 | +type EditGroupOption struct { | 
|  | 44 | +	// the new name of the group | 
|  | 45 | +	Name *string `json:"name,omitempty"` | 
|  | 46 | +	// the new description of the group | 
|  | 47 | +	Description *string `json:"description,omitempty"` | 
|  | 48 | +	// the new visibility of the group | 
|  | 49 | +	Visibility *VisibleType `json:"visibility,omitempty"` | 
|  | 50 | +} | 
0 commit comments