0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-12 23:00:36 +02:00
gitea/modules/structs/repo_group.go
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 01f7c9407b
add api types for groups
2026-04-02 20:00:50 -04:00

51 lines
1.6 KiB
Go

package structs
// Group represents a group of repositories and subgroups in an organization
// swagger:model
type Group struct {
ID int64 `json:"id"`
Owner *User `json:"owner"`
Name string `json:"name"`
Description string `json:"description"`
ParentGroupID int64 `json:"parentGroupID"`
NumRepos int64 `json:"num_repos"`
NumSubgroups int64 `json:"num_subgroups"`
Link string `json:"link"`
SortOrder int `json:"sort_order"`
}
// NewGroupOption - options for creating a new group in an organization
// swagger:model
type NewGroupOption struct {
// the name for the newly created group
//
// required: true
Name string `json:"name" binding:"Required"`
// the description of the newly created group
Description string `json:"description"`
// the visibility of the newly created group
Visibility VisibleType `json:"visibility"`
}
// MoveGroupOption - options for changing a group's parent and sort order
// swagger:model
type MoveGroupOption struct {
// the new parent group. can be 0 to specify no parent
//
// required: true
NewParent int64 `json:"newParent" binding:"Required"`
// the position of this group in its new parent
NewPos *int `json:"newPos,omitempty"`
}
// EditGroupOption - options for editing a repository group
// swagger:model
type EditGroupOption struct {
// the new name of the group
Name *string `json:"name,omitempty"`
// the new description of the group
Description *string `json:"description,omitempty"`
// the new visibility of the group
Visibility *VisibleType `json:"visibility,omitempty"`
}