diff options
author | Jonas Franz <info@jonasfranz.software> | 2018-03-06 02:22:16 +0100 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2018-03-06 09:22:16 +0800 |
commit | 9a5e628a7e8bc8e7de6ed05f3621442de3388086 (patch) | |
tree | 07bd2cc6c22bae9ea976f5c23359d9b5cbf0bd8c /vendor/code.gitea.io/sdk/gitea/admin_user.go | |
parent | 69ea5e438538863056af3bd70d182096b68f0d4a (diff) | |
download | gitea-9a5e628a7e8bc8e7de6ed05f3621442de3388086.tar.gz gitea-9a5e628a7e8bc8e7de6ed05f3621442de3388086.zip |
Add Attachment API (#3478)
* Add Attachment API
* repos/:owner/:repo/releases (add attachments)
* repos/:owner/:repo/releases/:id (add attachments)
* repos/:owner/:repo/releases/:id/attachments
* repos/:owner/:repo/releases/:id/attachments/:attachment_id
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Add unit tests for new attachment functions
Fix comments
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* fix lint
* Update vendor.json
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* remove version of sdk
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix unit tests
Add missing license header
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add CreateReleaseAttachment
Add EditReleaseAttachment
Add DeleteReleaseAttachment
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add filename query parameter for choosing another name for an attachment
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Fix order of imports
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Restricting updatable attachment columns
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* gofmt
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Update go-sdk
Replace Attachments with Assets
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Update go-sdk
Signed-off-by: Jonas Franz <info@jonasfranz.de>
* Updating go-sdk and regenerating swagger
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Add missing file of go-sdk
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Change origin of code.gitea.io/sdk to code.gitea.io/sdk
Update code.gitea.io/sdk
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Update swagger
Signed-off-by: Jonas Franz <info@jonasfranz.software>
* Update updateAttachment
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/admin_user.go')
-rw-r--r-- | vendor/code.gitea.io/sdk/gitea/admin_user.go | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/admin_user.go b/vendor/code.gitea.io/sdk/gitea/admin_user.go index 6d736d3462..bc0f36994d 100644 --- a/vendor/code.gitea.io/sdk/gitea/admin_user.go +++ b/vendor/code.gitea.io/sdk/gitea/admin_user.go @@ -12,7 +12,7 @@ import ( // CreateUserOption create user options type CreateUserOption struct { - SourceID int64 `json:"source_id"` + SourceID int64 `json:"source_id"` LoginName string `json:"login_name"` // required: true Username string `json:"username" binding:"Required;AlphaDashDot;MaxSize(35)"` @@ -21,8 +21,8 @@ type CreateUserOption struct { // swagger:strfmt email Email string `json:"email" binding:"Required;Email;MaxSize(254)"` // required: true - Password string `json:"password" binding:"Required;MaxSize(255)"` - SendNotify bool `json:"send_notify"` + Password string `json:"password" binding:"Required;MaxSize(255)"` + SendNotify bool `json:"send_notify"` } // AdminCreateUser create a user @@ -37,20 +37,20 @@ func (c *Client) AdminCreateUser(opt CreateUserOption) (*User, error) { // EditUserOption edit user options type EditUserOption struct { - SourceID int64 `json:"source_id"` + SourceID int64 `json:"source_id"` LoginName string `json:"login_name"` - FullName string `json:"full_name" binding:"MaxSize(100)"` + FullName string `json:"full_name" binding:"MaxSize(100)"` // required: true // swagger:strfmt email - Email string `json:"email" binding:"Required;Email;MaxSize(254)"` - Password string `json:"password" binding:"MaxSize(255)"` - Website string `json:"website" binding:"MaxSize(50)"` - Location string `json:"location" binding:"MaxSize(50)"` - Active *bool `json:"active"` - Admin *bool `json:"admin"` - AllowGitHook *bool `json:"allow_git_hook"` - AllowImportLocal *bool `json:"allow_import_local"` - MaxRepoCreation *int `json:"max_repo_creation"` + Email string `json:"email" binding:"Required;Email;MaxSize(254)"` + Password string `json:"password" binding:"MaxSize(255)"` + Website string `json:"website" binding:"MaxSize(50)"` + Location string `json:"location" binding:"MaxSize(50)"` + Active *bool `json:"active"` + Admin *bool `json:"admin"` + AllowGitHook *bool `json:"allow_git_hook"` + AllowImportLocal *bool `json:"allow_import_local"` + MaxRepoCreation *int `json:"max_repo_creation"` } // AdminEditUser modify user informations |