Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GiteaTokenResponse ¶
type GiteaTokenResponse struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
Scope string `json:"scope"`
}
GiteaTokenResponse Gitea OAuth Token 响应
func RefreshGitea ¶
func RefreshGitea(baseURL, clientID, clientSecret, refreshToken string, proxies ...string) (*GiteaTokenResponse, error)
RefreshGitea 刷新 Gitea OAuth access_token
func (*GiteaTokenResponse) ExpiresAt ¶
func (r *GiteaTokenResponse) ExpiresAt() int64
type GiteeTokenResponse ¶
type GiteeTokenResponse struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
Scope string `json:"scope"`
CreatedAt int64 `json:"created_at"`
}
GiteeTokenResponse Gitee OAuth Token 响应
func RefreshGitee ¶
func RefreshGitee(refreshToken string) (*GiteeTokenResponse, error)
RefreshGitee 刷新 Gitee OAuth access_token(无需 client 凭证)
func (*GiteeTokenResponse) ExpiresAt ¶
func (r *GiteeTokenResponse) ExpiresAt() int64
type GitlabTokenResponse ¶
type GitlabTokenResponse struct {
AccessToken string `json:"access_token"`
TokenType string `json:"token_type"`
ExpiresIn int `json:"expires_in"`
RefreshToken string `json:"refresh_token"`
CreatedAt int64 `json:"created_at"`
Scope string `json:"scope"`
}
GitlabTokenResponse GitLab OAuth Token 响应
func RefreshGitlab ¶
func RefreshGitlab(baseURL, clientID, clientSecret, refreshToken string, proxies ...string) (*GitlabTokenResponse, error)
RefreshGitlab 刷新 GitLab OAuth access_token
func (*GitlabTokenResponse) ExpiresAt ¶
func (r *GitlabTokenResponse) ExpiresAt() int64
Click to show internal directories.
Click to hide internal directories.