feat(service): 定义 Gemini 服务端口接口
- 定义 OAuth 服务接口 - 定义 Token 缓存服务接口 - 定义 Code Assist 服务接口
This commit is contained in:
13
backend/internal/service/gemini_oauth.go
Normal file
13
backend/internal/service/gemini_oauth.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package ports
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/Wei-Shaw/sub2api/internal/pkg/geminicli"
|
||||
)
|
||||
|
||||
// GeminiOAuthClient performs Google OAuth token exchange/refresh for Gemini integration.
|
||||
type GeminiOAuthClient interface {
|
||||
ExchangeCode(ctx context.Context, code, codeVerifier, redirectURI, proxyURL string) (*geminicli.TokenResponse, error)
|
||||
RefreshToken(ctx context.Context, refreshToken, proxyURL string) (*geminicli.TokenResponse, error)
|
||||
}
|
||||
Reference in New Issue
Block a user