From 54230435b7e11b93fe28fd210856e40837013aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=98=99=E2=97=A6=20The=20Tablet=20=E2=9D=80=20GamerGirla?= =?UTF-8?q?ndCo=20=E2=97=A6=E2=9D=A7?= Date: Wed, 13 Aug 2025 00:17:17 -0400 Subject: [PATCH] add structs describing group-related forms --- services/forms/group.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 services/forms/group.go diff --git a/services/forms/group.go b/services/forms/group.go new file mode 100644 index 0000000000..0240b41d1a --- /dev/null +++ b/services/forms/group.go @@ -0,0 +1,30 @@ +package forms + +import "code.gitea.io/gitea/modules/structs" + +// CreateGroupForm form for creating a repository group +type CreateGroupForm struct { + GroupName string `binding:"Required;MaxSize(255)"` + Description string `binding:"MaxSize(2048)"` + Permission string + CanCreateGroupRepo bool + ParentGroupID int64 +} + +type MovedGroupItemForm struct { + IsGroup bool `json:"isGroup"` + ItemID int64 `json:"id"` + NewParent int64 `json:"newParent"` + NewPos int `json:"newPosition"` +} +type CreateGroupTeamForm struct { + Permission string + Access string + CanCreateRepoOrSubGroup bool +} + +type UpdateGroupSettingForm struct { + Name string `binding:"Required;MaxSize(255)" locale:"group.group_name_holder"` + Description string `binding:"MaxSize(2048)"` + Visibility structs.VisibleType +}