Update dependency package code.gitea.io/sdk/gitea to latest version (#48)

This commit is contained in:
Lunny Xiao
2019-10-13 15:13:33 +00:00
committed by Gitea
parent 7c024bcd69
commit d1134e8008
39 changed files with 549 additions and 1096 deletions

View File

@ -19,19 +19,13 @@ func BasicAuthEncode(user, pass string) string {
}
// AccessToken represents an API access token.
// swagger:response AccessToken
type AccessToken struct {
ID int64 `json:"id"`
Name string `json:"name"`
Token string `json:"token"`
HashedToken string `json:"hashed_token"`
Token string `json:"sha1"`
TokenLastEight string `json:"token_last_eight"`
}
// 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)
@ -40,9 +34,8 @@ 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"`
Name string `json:"name"`
}
// CreateAccessToken create one access token with options