diff options
Diffstat (limited to 'vendor/code.gitea.io/sdk/gitea/user_app.go')
-rw-r--r-- | vendor/code.gitea.io/sdk/gitea/user_app.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/user_app.go b/vendor/code.gitea.io/sdk/gitea/user_app.go index 7fbb35dc3e..82d2a40462 100644 --- a/vendor/code.gitea.io/sdk/gitea/user_app.go +++ b/vendor/code.gitea.io/sdk/gitea/user_app.go @@ -18,11 +18,16 @@ func BasicAuthEncode(user, pass string) string { } // AccessToken represents a API access token. +// swagger:response AccessToken type AccessToken struct { Name string `json:"name"` Sha1 string `json:"sha1"` } +// AccessTokenList represents a list of API access token. +// swagger:response AccessTokenList +type AccessTokenList []*AccessToken + // ListAccessTokens lista all the access tokens of user func (c *Client) ListAccessTokens(user, pass string) ([]*AccessToken, error) { tokens := make([]*AccessToken, 0, 10) @@ -31,6 +36,7 @@ func (c *Client) ListAccessTokens(user, pass string) ([]*AccessToken, error) { } // CreateAccessTokenOption options when create access token +// swagger:parameters userCreateToken type CreateAccessTokenOption struct { Name string `json:"name" binding:"Required"` } |