@@ -8,22 +8,29 @@ import "time"
88
99// CreateUserOption create user options 
1010type  CreateUserOption  struct  {
11+ 	// The authentication source ID to associate with the user 
1112	SourceID  int64  `json:"source_id"` 
1213	// identifier of the user, provided by the external authenticator (if configured) 
1314	// default: empty 
1415	LoginName  string  `json:"login_name"` 
1516	// username of the user 
1617	// required: true 
1718	Username  string  `json:"username" binding:"Required;Username;MaxSize(40)"` 
19+ 	// The full display name of the user 
1820	FullName  string  `json:"full_name" binding:"MaxSize(100)"` 
1921	// required: true 
2022	// swagger:strfmt email 
21- 	Email               string  `json:"email" binding:"Required;Email;MaxSize(254)"` 
22- 	Password            string  `json:"password" binding:"MaxSize(255)"` 
23- 	MustChangePassword  * bool   `json:"must_change_password"` 
24- 	SendNotify          bool    `json:"send_notify"` 
25- 	Restricted          * bool   `json:"restricted"` 
26- 	Visibility          string  `json:"visibility" binding:"In(,public,limited,private)"` 
23+ 	Email  string  `json:"email" binding:"Required;Email;MaxSize(254)"` 
24+ 	// The plain text password for the user 
25+ 	Password  string  `json:"password" binding:"MaxSize(255)"` 
26+ 	// Whether the user must change password on first login 
27+ 	MustChangePassword  * bool  `json:"must_change_password"` 
28+ 	// Whether to send welcome notification email to the user 
29+ 	SendNotify  bool  `json:"send_notify"` 
30+ 	// Whether the user has restricted access privileges 
31+ 	Restricted  * bool  `json:"restricted"` 
32+ 	// User visibility level: public, limited, or private 
33+ 	Visibility  string  `json:"visibility" binding:"In(,public,limited,private)"` 
2734
2835	// For explicitly setting the user creation timestamp. Useful when users are 
2936	// migrated from other systems. When omitted, the user's creation timestamp 
@@ -34,26 +41,43 @@ type CreateUserOption struct {
3441// EditUserOption edit user options 
3542type  EditUserOption  struct  {
3643	// required: true 
44+ 	// The authentication source ID to associate with the user 
3745	SourceID  int64  `json:"source_id"` 
3846	// identifier of the user, provided by the external authenticator (if configured) 
3947	// default: empty 
4048	// required: true 
4149	LoginName  string  `json:"login_name" binding:"Required"` 
4250	// swagger:strfmt email 
43- 	Email                    * string  `json:"email" binding:"MaxSize(254)"` 
44- 	FullName                 * string  `json:"full_name" binding:"MaxSize(100)"` 
45- 	Password                 string   `json:"password" binding:"MaxSize(255)"` 
46- 	MustChangePassword       * bool    `json:"must_change_password"` 
47- 	Website                  * string  `json:"website" binding:"OmitEmpty;ValidUrl;MaxSize(255)"` 
48- 	Location                 * string  `json:"location" binding:"MaxSize(50)"` 
49- 	Description              * string  `json:"description" binding:"MaxSize(255)"` 
50- 	Active                   * bool    `json:"active"` 
51- 	Admin                    * bool    `json:"admin"` 
52- 	AllowGitHook             * bool    `json:"allow_git_hook"` 
53- 	AllowImportLocal         * bool    `json:"allow_import_local"` 
54- 	MaxRepoCreation          * int     `json:"max_repo_creation"` 
55- 	ProhibitLogin            * bool    `json:"prohibit_login"` 
56- 	AllowCreateOrganization  * bool    `json:"allow_create_organization"` 
57- 	Restricted               * bool    `json:"restricted"` 
58- 	Visibility               string   `json:"visibility" binding:"In(,public,limited,private)"` 
51+ 	// The email address of the user 
52+ 	Email  * string  `json:"email" binding:"MaxSize(254)"` 
53+ 	// The full display name of the user 
54+ 	FullName  * string  `json:"full_name" binding:"MaxSize(100)"` 
55+ 	// The plain text password for the user 
56+ 	Password  string  `json:"password" binding:"MaxSize(255)"` 
57+ 	// Whether the user must change password on next login 
58+ 	MustChangePassword  * bool  `json:"must_change_password"` 
59+ 	// The user's personal website URL 
60+ 	Website  * string  `json:"website" binding:"OmitEmpty;ValidUrl;MaxSize(255)"` 
61+ 	// The user's location or address 
62+ 	Location  * string  `json:"location" binding:"MaxSize(50)"` 
63+ 	// The user's personal description or bio 
64+ 	Description  * string  `json:"description" binding:"MaxSize(255)"` 
65+ 	// Whether the user account is active 
66+ 	Active  * bool  `json:"active"` 
67+ 	// Whether the user has administrator privileges 
68+ 	Admin  * bool  `json:"admin"` 
69+ 	// Whether the user can use Git hooks 
70+ 	AllowGitHook  * bool  `json:"allow_git_hook"` 
71+ 	// Whether the user can import local repositories 
72+ 	AllowImportLocal  * bool  `json:"allow_import_local"` 
73+ 	// Maximum number of repositories the user can create 
74+ 	MaxRepoCreation  * int  `json:"max_repo_creation"` 
75+ 	// Whether the user is prohibited from logging in 
76+ 	ProhibitLogin  * bool  `json:"prohibit_login"` 
77+ 	// Whether the user can create organizations 
78+ 	AllowCreateOrganization  * bool  `json:"allow_create_organization"` 
79+ 	// Whether the user has restricted access privileges 
80+ 	Restricted  * bool  `json:"restricted"` 
81+ 	// User visibility level: public, limited, or private 
82+ 	Visibility  string  `json:"visibility" binding:"In(,public,limited,private)"` 
5983}
0 commit comments