Documentation
¶
Index ¶
- Constants
- func AddChannel(c *gin.Context)
- func AddRedemption(c *gin.Context)
- func AddToken(c *gin.Context)
- func Admin2FAStats(c *gin.Context)
- func AdminBindSubscription(c *gin.Context)
- func AdminClearUserBinding(c *gin.Context)
- func AdminCompleteTopUp(c *gin.Context)
- func AdminCreateSubscriptionPlan(c *gin.Context)
- func AdminCreateUserSubscription(c *gin.Context)
- func AdminDeleteUserSubscription(c *gin.Context)
- func AdminDisable2FA(c *gin.Context)
- func AdminInvalidateUserSubscription(c *gin.Context)
- func AdminListSubscriptionPlans(c *gin.Context)
- func AdminListUserSubscriptions(c *gin.Context)
- func AdminResetPasskey(c *gin.Context)
- func AdminUpdateSubscriptionPlan(c *gin.Context)
- func AdminUpdateSubscriptionPlanStatus(c *gin.Context)
- func ApplyAllChannelUpstreamModelUpdates(c *gin.Context)
- func ApplyChannelUpstreamModelUpdates(c *gin.Context)
- func AutomaticallyTestChannels()
- func AutomaticallyUpdateChannels(frequency int)
- func BatchSetChannelTag(c *gin.Context)
- func ChannelListModels(c *gin.Context)
- func CheckClusterNameAvailability(c *gin.Context)
- func CleanupLogFiles(c *gin.Context)
- func ClearChannelAffinityCache(c *gin.Context)
- func ClearDiskCache(c *gin.Context)
- func CompleteCodexOAuth(c *gin.Context)
- func CompleteCodexOAuthForChannel(c *gin.Context)
- func ConfirmPaymentCompliance(c *gin.Context)
- func CopyChannel(c *gin.Context)
- func CreateCustomOAuthProvider(c *gin.Context)
- func CreateDeployment(c *gin.Context)
- func CreateLogCleanupSystemTask(c *gin.Context)
- func CreateModelMeta(c *gin.Context)
- func CreatePrefillGroup(c *gin.Context)
- func CreateUser(c *gin.Context)
- func CreateVendorMeta(c *gin.Context)
- func CreateWaffoPancakePair(c *gin.Context)
- func CreateWaffoPancakeSubscriptionProduct(c *gin.Context)
- func CreemWebhook(c *gin.Context)
- func DashboardListModels(c *gin.Context)
- func DeleteChannel(c *gin.Context)
- func DeleteChannelBatch(c *gin.Context)
- func DeleteCustomOAuthProvider(c *gin.Context)
- func DeleteDeployment(c *gin.Context)
- func DeleteDisabledChannel(c *gin.Context)
- func DeleteInvalidRedemption(c *gin.Context)
- func DeleteModelMeta(c *gin.Context)
- func DeleteOldLogsCompat(c *gin.Context)
- func DeletePrefillGroup(c *gin.Context)
- func DeleteRedemption(c *gin.Context)
- func DeleteSelf(c *gin.Context)
- func DeleteSystemInstance(c *gin.Context)
- func DeleteToken(c *gin.Context)
- func DeleteTokenBatch(c *gin.Context)
- func DeleteUser(c *gin.Context)
- func DeleteVendorMeta(c *gin.Context)
- func DetectAllChannelUpstreamModelUpdates(c *gin.Context)
- func DetectChannelUpstreamModelUpdates(c *gin.Context)
- func Disable2FA(c *gin.Context)
- func DisableTagChannels(c *gin.Context)
- func DiscordBind(c *gin.Context)
- func DiscordOAuth(c *gin.Context)
- func DoCheckin(c *gin.Context)
- func EditTagChannels(c *gin.Context)
- func EmailBind(c *gin.Context)
- func Enable2FA(c *gin.Context)
- func EnableTagChannels(c *gin.Context)
- func EnabledListModels(c *gin.Context)
- func EpayNotify(c *gin.Context)
- func ExtendDeployment(c *gin.Context)
- func FetchCustomOAuthDiscovery(c *gin.Context)
- func FetchModels(c *gin.Context)
- func FetchUpstreamModels(c *gin.Context)
- func FetchUpstreamRatios(c *gin.Context)
- func FixChannelsAbilities(c *gin.Context)
- func ForceGC(c *gin.Context)
- func GenerateAccessToken(c *gin.Context)
- func GenerateOAuthCode(c *gin.Context)
- func Get2FAStatus(c *gin.Context)
- func GetAbout(c *gin.Context)
- func GetAffCode(c *gin.Context)
- func GetAllChannels(c *gin.Context)
- func GetAllDeployments(c *gin.Context)
- func GetAllLogs(c *gin.Context)
- func GetAllMidjourney(c *gin.Context)
- func GetAllModelsMeta(c *gin.Context)
- func GetAllQuotaDates(c *gin.Context)
- func GetAllRedemptions(c *gin.Context)
- func GetAllTask(c *gin.Context)
- func GetAllTokens(c *gin.Context)
- func GetAllTopUps(c *gin.Context)
- func GetAllUsers(c *gin.Context)
- func GetAllVendors(c *gin.Context)
- func GetAuthHeader(token string) http.Header
- func GetAvailableReplicas(c *gin.Context)
- func GetChannel(c *gin.Context)
- func GetChannelAffinityCacheStats(c *gin.Context)
- func GetChannelAffinityUsageCacheStats(c *gin.Context)
- func GetChannelKey(c *gin.Context)
- func GetChargedAmount(count float64, user model.User) float64
- func GetCheckinStatus(c *gin.Context)
- func GetClaudeAuthHeader(token string) http.Header
- func GetCodexChannelUsage(c *gin.Context)
- func GetContainerDetails(c *gin.Context)
- func GetCurrentLogCleanupSystemTask(c *gin.Context)
- func GetCurrentSystemTask(c *gin.Context)
- func GetCustomOAuthProvider(c *gin.Context)
- func GetCustomOAuthProviders(c *gin.Context)
- func GetDeployment(c *gin.Context)
- func GetDeploymentLogs(c *gin.Context)
- func GetEpayClient() *epay.Client
- func GetGroups(c *gin.Context)
- func GetHardwareTypes(c *gin.Context)
- func GetHomePageContent(c *gin.Context)
- func GetImage(c *gin.Context)
- func GetLocations(c *gin.Context)
- func GetLogByKey(c *gin.Context)
- func GetLogCleanupSystemTask(c *gin.Context)
- func GetLogFiles(c *gin.Context)
- func GetLogsSelfStat(c *gin.Context)
- func GetLogsStat(c *gin.Context)
- func GetMidjourney(c *gin.Context)
- func GetMissingModels(c *gin.Context)
- func GetModelDeploymentSettings(c *gin.Context)
- func GetModelMeta(c *gin.Context)
- func GetNotice(c *gin.Context)
- func GetOptions(c *gin.Context)
- func GetPerfMetrics(c *gin.Context)
- func GetPerfMetricsSummary(c *gin.Context)
- func GetPerformanceStats(c *gin.Context)
- func GetPrefillGroups(c *gin.Context)
- func GetPriceEstimation(c *gin.Context)
- func GetPricing(c *gin.Context)
- func GetPrivacyPolicy(c *gin.Context)
- func GetQuotaDatesByUser(c *gin.Context)
- func GetRankings(c *gin.Context)
- func GetRatioConfig(c *gin.Context)
- func GetRedemption(c *gin.Context)
- func GetResponseBody(method, url string, channel *model.Channel, headers http.Header) ([]byte, error)
- func GetSelf(c *gin.Context)
- func GetSetup(c *gin.Context)
- func GetStatus(c *gin.Context)
- func GetSubscription(c *gin.Context)
- func GetSubscriptionPlans(c *gin.Context)
- func GetSubscriptionSelf(c *gin.Context)
- func GetSyncableChannels(c *gin.Context)
- func GetSystemTask(c *gin.Context)
- func GetTagModels(c *gin.Context)
- func GetToken(c *gin.Context)
- func GetTokenKey(c *gin.Context)
- func GetTokenKeysBatch(c *gin.Context)
- func GetTokenStatus(c *gin.Context)
- func GetTokenUsage(c *gin.Context)
- func GetTopUpInfo(c *gin.Context)
- func GetUptimeKumaStatus(c *gin.Context)
- func GetUsage(c *gin.Context)
- func GetUser(c *gin.Context)
- func GetUserAgreement(c *gin.Context)
- func GetUserGroups(c *gin.Context)
- func GetUserLogs(c *gin.Context)
- func GetUserMidjourney(c *gin.Context)
- func GetUserModels(c *gin.Context)
- func GetUserOAuthBindings(c *gin.Context)
- func GetUserOAuthBindingsByAdmin(c *gin.Context)
- func GetUserQuotaDates(c *gin.Context)
- func GetUserTask(c *gin.Context)
- func GetUserTopUps(c *gin.Context)
- func GetVendorMeta(c *gin.Context)
- func GitHubBind(c *gin.Context)
- func GitHubOAuth(c *gin.Context)
- func HandleOAuth(c *gin.Context)
- func KlingImage2VideoGenerations(c *gin.Context)
- func KlingImage2videoTaskId(c *gin.Context)
- func KlingText2VideoGenerations(c *gin.Context)
- func KlingText2videoTaskId(c *gin.Context)
- func LinuxDoBind(c *gin.Context)
- func LinuxdoOAuth(c *gin.Context)
- func ListDeploymentContainers(c *gin.Context)
- func ListModels(c *gin.Context, modelType int)
- func ListSystemInstances(c *gin.Context)
- func ListSystemTasks(c *gin.Context)
- func ListWaffoPancakeCatalog(c *gin.Context)
- func ListWaffoPancakeSubscriptionProductOptions(c *gin.Context)
- func LockOrder(tradeNo string)
- func Login(c *gin.Context)
- func Logout(c *gin.Context)
- func ManageMultiKeys(c *gin.Context)
- func ManageUser(c *gin.Context)
- func MigrateConsoleSetting(c *gin.Context)
- func OidcAuth(c *gin.Context)
- func OidcBind(c *gin.Context)
- func OllamaDeleteModel(c *gin.Context)
- func OllamaPullModel(c *gin.Context)
- func OllamaPullModelStream(c *gin.Context)
- func OllamaVersion(c *gin.Context)
- func PasskeyDelete(c *gin.Context)
- func PasskeyLoginBegin(c *gin.Context)
- func PasskeyLoginFinish(c *gin.Context)
- func PasskeyRegisterBegin(c *gin.Context)
- func PasskeyRegisterFinish(c *gin.Context)
- func PasskeyStatus(c *gin.Context)
- func PasskeyVerifyBegin(c *gin.Context)
- func PasskeyVerifyFinish(c *gin.Context)
- func Playground(c *gin.Context)
- func PostSetup(c *gin.Context)
- func RefreshCodexChannelCredential(c *gin.Context)
- func RegenerateBackupCodes(c *gin.Context)
- func Register(c *gin.Context)
- func Relay(c *gin.Context, relayFormat types.RelayFormat)
- func RelayMidjourney(c *gin.Context)
- func RelayNotFound(c *gin.Context)
- func RelayNotImplemented(c *gin.Context)
- func RelayTask(c *gin.Context)
- func RelayTaskFetch(c *gin.Context)
- func RequestAmount(c *gin.Context)
- func RequestCreemPay(c *gin.Context)
- func RequestEpay(c *gin.Context)
- func RequestStripeAmount(c *gin.Context)
- func RequestStripePay(c *gin.Context)
- func RequestWaffoAmount(c *gin.Context)
- func RequestWaffoPancakeAmount(c *gin.Context)
- func RequestWaffoPancakePay(c *gin.Context)
- func RequestWaffoPay(c *gin.Context)
- func ResetModelRatio(c *gin.Context)
- func ResetPassword(c *gin.Context)
- func ResetPerformanceStats(c *gin.Context)
- func RetrieveModel(c *gin.Context, modelType int)
- func SaveWaffoPancake(c *gin.Context)
- func SearchAllLogs(c *gin.Context)deprecated
- func SearchChannels(c *gin.Context)
- func SearchDeployments(c *gin.Context)
- func SearchModelsMeta(c *gin.Context)
- func SearchRedemptions(c *gin.Context)
- func SearchTokens(c *gin.Context)
- func SearchUserLogs(c *gin.Context)deprecated
- func SearchUsers(c *gin.Context)
- func SearchVendors(c *gin.Context)
- func SendEmailVerification(c *gin.Context)
- func SendPasswordResetEmail(c *gin.Context)
- func Setup2FA(c *gin.Context)
- func StartChannelUpstreamModelUpdateTask()
- func StartCodexOAuth(c *gin.Context)
- func StartCodexOAuthForChannel(c *gin.Context)
- func StripeWebhook(c *gin.Context)
- func SubscriptionEpayNotify(c *gin.Context)
- func SubscriptionEpayReturn(c *gin.Context)
- func SubscriptionRequestBalancePay(c *gin.Context)
- func SubscriptionRequestCreemPay(c *gin.Context)
- func SubscriptionRequestEpay(c *gin.Context)
- func SubscriptionRequestStripePay(c *gin.Context)
- func SubscriptionRequestWaffoPancakePay(c *gin.Context)
- func SyncUpstreamModels(c *gin.Context)
- func SyncUpstreamPreview(c *gin.Context)
- func TelegramBind(c *gin.Context)
- func TelegramLogin(c *gin.Context)
- func TestAllChannels(c *gin.Context)
- func TestChannel(c *gin.Context)
- func TestIoNetConnection(c *gin.Context)
- func TestStatus(c *gin.Context)
- func TopUp(c *gin.Context)
- func TransferAffQuota(c *gin.Context)
- func UnbindCustomOAuth(c *gin.Context)
- func UnbindCustomOAuthByAdmin(c *gin.Context)
- func UniversalVerify(c *gin.Context)
- func UnlockOrder(tradeNo string)
- func UpdateAllChannelsBalance(c *gin.Context)
- func UpdateChannel(c *gin.Context)
- func UpdateChannelBalance(c *gin.Context)
- func UpdateCustomOAuthProvider(c *gin.Context)
- func UpdateDeployment(c *gin.Context)
- func UpdateDeploymentName(c *gin.Context)
- func UpdateMidjourneyTaskBulk()
- func UpdateModelMeta(c *gin.Context)
- func UpdateOption(c *gin.Context)
- func UpdatePrefillGroup(c *gin.Context)
- func UpdateRedemption(c *gin.Context)
- func UpdateSelf(c *gin.Context)
- func UpdateSubscriptionPreference(c *gin.Context)
- func UpdateTaskBulk()
- func UpdateTieredBillingConfig(c *gin.Context)
- func UpdateToken(c *gin.Context)
- func UpdateUser(c *gin.Context)
- func UpdateUserSetting(c *gin.Context)
- func UpdateVendorMeta(c *gin.Context)
- func UpdateVideoTaskAll(ctx context.Context, platform constant.TaskPlatform, ...) error
- func Verify2FALogin(c *gin.Context)
- func VideoGenerations(c *gin.Context)
- func VideoGenerationsTaskId(c *gin.Context)
- func VideoProxy(c *gin.Context)
- func WaffoPancakeWebhook(c *gin.Context)
- func WaffoWebhook(c *gin.Context)
- func WeChatAuth(c *gin.Context)
- func WeChatBind(c *gin.Context)
- type AIProxyUserOverviewResponse
- type APGC2DGPTUsageResponse
- type API2GPTUsageResponse
- type AddChannelRequest
- type AdminBindSubscriptionRequest
- type AdminCompleteTopupRequest
- type AdminCreateUserSubscriptionRequest
- type AdminUpdateSubscriptionPlanStatusRequest
- type AdminUpsertSubscriptionPlanRequest
- type AmountRequest
- type BillingPreferenceRequest
- type ChannelBatch
- type ChannelTag
- type CreateCustomOAuthProviderRequest
- type CreemAdaptor
- type CreemCheckoutRequest
- type CreemCheckoutResponse
- type CreemPayRequest
- type CreemProduct
- type CreemWebhookEvent
- type CustomOAuthProviderResponse
- type DeepSeekUsageResponse
- type DiscordResponse
- type DiscordUser
- type DiskCacheInfo
- type EpayRequest
- type FetchCustomOAuthDiscoveryRequest
- type GitHubOAuthResponse
- type GitHubUser
- type KeyStatus
- type KlingCameraConfig
- type KlingCameraControl
- type KlingImage2VideoRequest
- type KlingText2VideoRequest
- type LinuxdoUser
- type LogFileInfo
- type LogFilesResponse
- type LoginRequest
- type ManageRequest
- type MemoryStats
- type Monitor
- type MultiKeyManageRequest
- type MultiKeyStatusResponse
- type OAuthRegistrationDisabledError
- type OAuthUserDeletedError
- type OidcResponse
- type OidcUser
- type OpenAICreditGrants
- type OpenAIModel
- type OpenAIModelsResponse
- type OpenAISBUsageResponse
- type OpenAISubscriptionResponse
- type OpenAIUsageDailyCost
- type OpenAIUsageResponse
- type OpenRouterCreditResponse
- type OptionUpdateRequest
- type PasswordResetRequest
- type PatchChannel
- type PaymentComplianceRequest
- type PerformanceConfig
- type PerformanceStats
- type Setup
- type Setup2FARequest
- type Setup2FAResponse
- type SetupRequest
- type SiliconFlowUsageResponse
- type StripeAdaptor
- type StripePayRequest
- type SubscriptionBalancePayRequest
- type SubscriptionCreemPayRequest
- type SubscriptionEpayPayRequest
- type SubscriptionPlanDTO
- type SubscriptionStripePayRequest
- type SubscriptionWaffoPancakePayRequest
- type TieredBillingConfigItem
- type TieredBillingUpdateRequest
- type TokenBatch
- type TransferAffQuotaRequest
- type UniversalVerifyRequest
- type UpdateCustomOAuthProviderRequest
- type UpdateUserSettingRequest
- type UptimeGroupResult
- type UserOAuthBindingResponse
- type VerificationStatusResponse
- type Verify2FARequest
- type WaffoPancakePayRequest
- type WaffoPayRequest
Constants ¶
const ( // SecureVerificationSessionKey means the user has fully passed secure verification. SecureVerificationSessionKey = "secure_verified_at" // PasskeyReadySessionKey means WebAuthn finished and /api/verify can finalize step-up verification. PasskeyReadySessionKey = "secure_passkey_ready_at" // SecureVerificationTimeout 验证有效期(秒) SecureVerificationTimeout = 300 // 5分钟 // PasskeyReadyTimeout passkey ready 标记有效期(秒) PasskeyReadyTimeout = 60 )
const CreemSignatureHeader = "creem-signature"
Variables ¶
This section is empty.
Functions ¶
func AddChannel ¶
func AddRedemption ¶
func AdminBindSubscription ¶
func AdminClearUserBinding ¶
func AdminCreateUserSubscription ¶
AdminCreateUserSubscription creates a new user subscription from a plan (no payment).
func AdminDeleteUserSubscription ¶
AdminDeleteUserSubscription hard-deletes a user subscription.
func AdminInvalidateUserSubscription ¶
AdminInvalidateUserSubscription cancels a user subscription immediately.
func AdminResetPasskey ¶
func AutomaticallyTestChannels ¶
func AutomaticallyTestChannels()
func AutomaticallyUpdateChannels ¶
func AutomaticallyUpdateChannels(frequency int)
func BatchSetChannelTag ¶
func ChannelListModels ¶
func CompleteCodexOAuth ¶
func CopyChannel ¶
CopyChannel handles cloning an existing channel with its key. POST /api/channel/copy/:id Optional query params:
suffix - string appended to the original name (default "_复制") reset_balance - bool, when true will reset balance & used_quota to 0 (default true)
func CreateCustomOAuthProvider ¶
CreateCustomOAuthProvider creates a new custom OAuth provider
func CreateDeployment ¶
func CreateUser ¶
func CreateWaffoPancakePair ¶
CreateWaffoPancakePair mints a Store + OnetimeProduct pair in one round- trip. Surfaces an orphan-store flag when the product half fails so the frontend can preselect / retry without losing context.
func CreateWaffoPancakeSubscriptionProduct ¶
CreateWaffoPancakeSubscriptionProduct mints an OnetimeProduct (not SubscriptionProduct — see service.CreateWaffoPancakeProductForPlan) sized to a plan's `name` + `amount`, using persisted Pancake credentials + StoreID. Reads from the form, not the plan row, so newly-typed unsaved plans can mint a product too.
func CreemWebhook ¶
func DashboardListModels ¶
func DeleteChannel ¶
func DeleteChannelBatch ¶
func DeleteCustomOAuthProvider ¶
DeleteCustomOAuthProvider deletes a custom OAuth provider
func DeleteDeployment ¶
func DeleteDisabledChannel ¶
func DeleteInvalidRedemption ¶
func DeleteOldLogsCompat ¶
func DeleteRedemption ¶
func DeleteSelf ¶
func DeleteSystemInstance ¶
func DeleteToken ¶
func DeleteTokenBatch ¶
func DeleteUser ¶
func DisableTagChannels ¶
func DiscordBind ¶
func DiscordOAuth ¶
func EditTagChannels ¶
func EnableTagChannels ¶
func EnabledListModels ¶
func EpayNotify ¶
func ExtendDeployment ¶
func FetchCustomOAuthDiscovery ¶
FetchCustomOAuthDiscovery fetches OIDC discovery document via backend (root-only route)
func FetchModels ¶
func FetchUpstreamModels ¶
func FetchUpstreamRatios ¶
func FixChannelsAbilities ¶
func GenerateAccessToken ¶
func GenerateOAuthCode ¶
GenerateOAuthCode generates a state code for OAuth CSRF protection
func GetAffCode ¶
func GetAllChannels ¶
func GetAllDeployments ¶
func GetAllLogs ¶
func GetAllMidjourney ¶
func GetAllQuotaDates ¶
func GetAllRedemptions ¶
func GetAllTask ¶
func GetAllTokens ¶
func GetAllUsers ¶
func GetAvailableReplicas ¶
func GetChannel ¶
func GetChannelKey ¶
GetChannelKey 获取渠道密钥(需要通过安全验证中间件) 此函数依赖 SecureVerificationRequired 中间件,确保用户已通过安全验证
func GetClaudeAuthHeader ¶
GetClaudeAuthHeader get claude auth header
func GetCodexChannelUsage ¶
func GetContainerDetails ¶
func GetCurrentSystemTask ¶
func GetCustomOAuthProvider ¶
GetCustomOAuthProvider returns a single custom OAuth provider by ID
func GetCustomOAuthProviders ¶
GetCustomOAuthProviders returns all custom OAuth providers
func GetDeployment ¶
func GetDeploymentLogs ¶
func GetEpayClient ¶
func GetHardwareTypes ¶
func GetHomePageContent ¶
func GetLocations ¶
func GetLogByKey ¶
func GetLogCleanupSystemTask ¶
func GetLogsSelfStat ¶
func GetLogsStat ¶
func GetMidjourney ¶
func GetMissingModels ¶
GetMissingModels returns the list of model names that are referenced by channels but do not have corresponding records in the models meta table. This helps administrators quickly discover models that need configuration.
func GetOptions ¶
func GetPerfMetrics ¶
func GetPerfMetricsSummary ¶
func GetPrefillGroups ¶
GetPrefillGroups 获取预填组列表,可通过 ?type=xxx 过滤
func GetPriceEstimation ¶
func GetPricing ¶
func GetPrivacyPolicy ¶
func GetQuotaDatesByUser ¶
func GetRankings ¶
func GetRatioConfig ¶
func GetRedemption ¶
func GetResponseBody ¶
func GetSubscription ¶
func GetSubscriptionPlans ¶
func GetSubscriptionSelf ¶
func GetSyncableChannels ¶
func GetSystemTask ¶
func GetTagModels ¶
func GetTokenKey ¶
func GetTokenKeysBatch ¶
func GetTokenStatus ¶
func GetTokenUsage ¶
func GetTopUpInfo ¶
func GetUptimeKumaStatus ¶
func GetUserAgreement ¶
func GetUserGroups ¶
func GetUserLogs ¶
func GetUserMidjourney ¶
func GetUserModels ¶
func GetUserOAuthBindings ¶
GetUserOAuthBindings returns all OAuth bindings for the current user
func GetUserQuotaDates ¶
func GetUserTask ¶
func GetUserTopUps ¶
func GitHubBind ¶
func GitHubOAuth ¶
func HandleOAuth ¶
HandleOAuth handles OAuth callback for all standard OAuth providers
func KlingImage2VideoGenerations ¶
KlingImage2VideoGenerations @Summary 可灵官方-图生视频 @Description 调用可灵AI图生视频接口,生成视频内容 @Tags Video @Accept json @Produce json @Param Authorization header string true "用户认证令牌 (Aeess-Token: sk-xxxx)" @Param request body KlingImage2VideoRequest true "图生视频请求参数" @Success 200 {object} dto.VideoTaskResponse "任务状态和结果" @Failure 400 {object} dto.OpenAIError "请求参数错误" @Failure 401 {object} dto.OpenAIError "未授权" @Failure 403 {object} dto.OpenAIError "无权限" @Failure 500 {object} dto.OpenAIError "服务器内部错误" @Router /kling/v1/videos/image2video [post]
func KlingImage2videoTaskId ¶
KlingImage2videoTaskId godoc @Summary 可灵任务查询--图生视频 @Description Query the status and result of a Kling video generation task by task ID @Tags Origin @Accept json @Produce json @Param task_id path string true "Task ID" @Router /kling/v1/videos/image2video/{task_id} [get]
func KlingText2VideoGenerations ¶
KlingText2VideoGenerations @Summary 可灵文生视频 @Description 调用可灵AI文生视频接口,生成视频内容 @Tags Video @Accept json @Produce json @Param Authorization header string true "用户认证令牌 (Aeess-Token: sk-xxxx)" @Param request body KlingText2VideoRequest true "视频生成请求参数" @Success 200 {object} dto.VideoTaskResponse "任务状态和结果" @Failure 400 {object} dto.OpenAIError "请求参数错误" @Failure 401 {object} dto.OpenAIError "未授权" @Failure 403 {object} dto.OpenAIError "无权限" @Failure 500 {object} dto.OpenAIError "服务器内部错误" @Router /kling/v1/videos/text2video [post]
func KlingText2videoTaskId ¶
KlingText2videoTaskId godoc @Summary 可灵任务查询--文生视频 @Description Query the status and result of a Kling text-to-video generation task by task ID @Tags Origin @Accept json @Produce json @Param task_id path string true "Task ID" @Router /kling/v1/videos/text2video/{task_id} [get]
func LinuxDoBind ¶
func LinuxdoOAuth ¶
func ListModels ¶
func ListSystemInstances ¶
func ListSystemTasks ¶
func ListWaffoPancakeCatalog ¶
ListWaffoPancakeCatalog returns the merchant's Stores + OnetimeProducts. Doubles as a credential probe (a successful 200 proves the resolved creds authenticate). See resolveWaffoPancakeAdminCreds for credential resolution.
func ListWaffoPancakeSubscriptionProductOptions ¶
ListWaffoPancakeSubscriptionProductOptions returns the OnetimeProducts in the saved Pancake store, for the subscription-plan dropdown. The name reflects max-api's plan concept; under the hood it's still OnetimeProducts.
func ManageMultiKeys ¶
ManageMultiKeys handles multi-key management operations
func MigrateConsoleSetting ¶
MigrateConsoleSetting 迁移旧的控制台相关配置到 console_setting.*
func OllamaPullModelStream ¶
OllamaPullModelStream 流式拉取 Ollama 模型
func PasskeyDelete ¶
func PasskeyLoginBegin ¶
func PasskeyLoginFinish ¶
func PasskeyRegisterBegin ¶
func PasskeyRegisterFinish ¶
func PasskeyStatus ¶
func PasskeyVerifyBegin ¶
func PasskeyVerifyFinish ¶
func Playground ¶
func RegenerateBackupCodes ¶
RegenerateBackupCodes 重新生成备用码
func RelayMidjourney ¶
func RelayNotFound ¶
func RelayNotImplemented ¶
func RelayTaskFetch ¶
func RequestAmount ¶
func RequestCreemPay ¶
func RequestEpay ¶
func RequestStripeAmount ¶
func RequestStripePay ¶
func RequestWaffoAmount ¶
func RequestWaffoPancakePay ¶
func ResetModelRatio ¶
func ResetPassword ¶
func ResetPerformanceStats ¶
ResetPerformanceStats 重置性能统计
func RetrieveModel ¶
func SaveWaffoPancake ¶
SaveWaffoPancake atomically persists all five operator-controlled fields. Catalog / pair endpoints are transient — only this one writes the OptionMap.
func SearchAllLogs
deprecated
func SearchChannels ¶
func SearchDeployments ¶
func SearchRedemptions ¶
func SearchTokens ¶
func SearchUserLogs
deprecated
func SearchUsers ¶
func SendEmailVerification ¶
func SendPasswordResetEmail ¶
func StartChannelUpstreamModelUpdateTask ¶
func StartChannelUpstreamModelUpdateTask()
func StartCodexOAuth ¶
func StripeWebhook ¶
func SubscriptionEpayNotify ¶
func SubscriptionEpayReturn ¶
SubscriptionEpayReturn handles browser return after payment. It verifies the payload and completes the order, then redirects to console.
func SubscriptionRequestEpay ¶
func SyncUpstreamModels ¶
SyncUpstreamModels 同步上游模型与供应商: - 默认仅创建「未配置模型」 - 可通过 overwrite 选择性覆盖更新本地已有模型的字段(前提:sync_official <> 0)
func SyncUpstreamPreview ¶
SyncUpstreamPreview 预览上游与本地的差异(仅用于弹窗选择)
func TelegramBind ¶
func TelegramLogin ¶
func TestAllChannels ¶
func TestChannel ¶
func TestIoNetConnection ¶
func TestStatus ¶
func TransferAffQuota ¶
func UnbindCustomOAuth ¶
UnbindCustomOAuth unbinds a custom OAuth provider from the current user
func UniversalVerify ¶
UniversalVerify 通用验证接口 支持 2FA 和 Passkey 验证,验证成功后在 session 中记录时间戳
func UpdateChannel ¶
func UpdateChannelBalance ¶
func UpdateCustomOAuthProvider ¶
UpdateCustomOAuthProvider updates an existing custom OAuth provider
func UpdateDeployment ¶
func UpdateDeploymentName ¶
func UpdateMidjourneyTaskBulk ¶
func UpdateMidjourneyTaskBulk()
func UpdateOption ¶
func UpdateRedemption ¶
func UpdateSelf ¶
func UpdateToken ¶
func UpdateUser ¶
func UpdateUserSetting ¶
func UpdateVideoTaskAll ¶
func VideoGenerations ¶
VideoGenerations @Summary 生成视频 @Description 调用视频生成接口生成视频 @Description 支持多种视频生成服务: @Description - 可灵AI (Kling): https://app.klingai.com/cn/dev/document-api/apiReference/commonInfo @Description - 即梦 (Jimeng): https://www.volcengine.com/docs/85621/1538636 @Tags Video @Accept json @Produce json @Param Authorization header string true "用户认证令牌 (Aeess-Token: sk-xxxx)" @Param request body dto.VideoRequest true "视频生成请求参数" @Failure 400 {object} dto.OpenAIError "请求参数错误" @Failure 401 {object} dto.OpenAIError "未授权" @Failure 403 {object} dto.OpenAIError "无权限" @Failure 500 {object} dto.OpenAIError "服务器内部错误" @Router /v1/video/generations [post]
func VideoGenerationsTaskId ¶
VideoGenerationsTaskId @Summary 查询视频 @Description 根据任务ID查询视频生成任务的状态和结果 @Tags Video @Accept json @Produce json @Security BearerAuth @Param task_id path string true "Task ID" @Success 200 {object} dto.VideoTaskResponse "任务状态和结果" @Failure 400 {object} dto.OpenAIError "请求参数错误" @Failure 401 {object} dto.OpenAIError "未授权" @Failure 403 {object} dto.OpenAIError "无权限" @Failure 500 {object} dto.OpenAIError "服务器内部错误" @Router /v1/video/generations/{task_id} [get]
func VideoProxy ¶
func WaffoPancakeWebhook ¶
func WeChatAuth ¶
func WeChatBind ¶
Types ¶
type APGC2DGPTUsageResponse ¶
type API2GPTUsageResponse ¶
type AddChannelRequest ¶
type AdminCompleteTopupRequest ¶
type AdminCompleteTopupRequest struct {
TradeNo string `json:"trade_no"`
}
type AdminCreateUserSubscriptionRequest ¶
type AdminCreateUserSubscriptionRequest struct {
PlanId int `json:"plan_id"`
}
type AdminUpdateSubscriptionPlanStatusRequest ¶
type AdminUpdateSubscriptionPlanStatusRequest struct {
Enabled *bool `json:"enabled"`
}
type AdminUpsertSubscriptionPlanRequest ¶
type AdminUpsertSubscriptionPlanRequest struct {
Plan model.SubscriptionPlan `json:"plan"`
}
type AmountRequest ¶
type AmountRequest struct {
Amount int64 `json:"amount"`
}
type BillingPreferenceRequest ¶
type BillingPreferenceRequest struct {
BillingPreference string `json:"billing_preference"`
}
type ChannelBatch ¶
type ChannelTag ¶
type ChannelTag struct {
Tag string `json:"tag"`
NewTag *string `json:"new_tag"`
Priority *int64 `json:"priority"`
Weight *uint `json:"weight"`
ModelMapping *string `json:"model_mapping"`
Models *string `json:"models"`
Groups *string `json:"groups"`
ParamOverride *string `json:"param_override"`
HeaderOverride *string `json:"header_override"`
}
type CreateCustomOAuthProviderRequest ¶
type CreateCustomOAuthProviderRequest struct {
Name string `json:"name" binding:"required"`
Slug string `json:"slug" binding:"required"`
Icon string `json:"icon"`
Enabled bool `json:"enabled"`
ClientId string `json:"client_id" binding:"required"`
ClientSecret string `json:"client_secret" binding:"required"`
AuthorizationEndpoint string `json:"authorization_endpoint" binding:"required"`
TokenEndpoint string `json:"token_endpoint" binding:"required"`
UserInfoEndpoint string `json:"user_info_endpoint" binding:"required"`
Scopes string `json:"scopes"`
UserIdField string `json:"user_id_field"`
UsernameField string `json:"username_field"`
DisplayNameField string `json:"display_name_field"`
EmailField string `json:"email_field"`
WellKnown string `json:"well_known"`
AuthStyle int `json:"auth_style"`
AccessPolicy string `json:"access_policy"`
AccessDeniedMessage string `json:"access_denied_message"`
}
CreateCustomOAuthProviderRequest is the request structure for creating a custom OAuth provider
type CreemAdaptor ¶
type CreemAdaptor struct {
}
func (*CreemAdaptor) RequestPay ¶
func (*CreemAdaptor) RequestPay(c *gin.Context, req *CreemPayRequest)
type CreemCheckoutRequest ¶
type CreemCheckoutResponse ¶
type CreemPayRequest ¶
type CreemProduct ¶
type CreemWebhookEvent ¶
type CreemWebhookEvent struct {
Id string `json:"id"`
EventType string `json:"eventType"`
CreatedAt int64 `json:"created_at"`
Object struct {
Id string `json:"id"`
Object string `json:"object"`
RequestId string `json:"request_id"`
Order struct {
Object string `json:"object"`
Id string `json:"id"`
Customer string `json:"customer"`
Product string `json:"product"`
Amount int `json:"amount"`
Currency string `json:"currency"`
SubTotal int `json:"sub_total"`
TaxAmount int `json:"tax_amount"`
AmountDue int `json:"amount_due"`
AmountPaid int `json:"amount_paid"`
Status string `json:"status"`
Type string `json:"type"`
Transaction string `json:"transaction"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Mode string `json:"mode"`
} `json:"order"`
Product struct {
Id string `json:"id"`
Object string `json:"object"`
Name string `json:"name"`
Description string `json:"description"`
Price int `json:"price"`
Currency string `json:"currency"`
BillingType string `json:"billing_type"`
BillingPeriod string `json:"billing_period"`
Status string `json:"status"`
TaxMode string `json:"tax_mode"`
TaxCategory string `json:"tax_category"`
DefaultSuccessUrl *string `json:"default_success_url"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Mode string `json:"mode"`
} `json:"product"`
Units int `json:"units"`
Customer struct {
Id string `json:"id"`
Object string `json:"object"`
Email string `json:"email"`
Name string `json:"name"`
Country string `json:"country"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Mode string `json:"mode"`
} `json:"customer"`
Status string `json:"status"`
Metadata map[string]string `json:"metadata"`
Mode string `json:"mode"`
} `json:"object"`
}
新的Creem Webhook结构体,匹配实际的webhook数据格式
type CustomOAuthProviderResponse ¶
type CustomOAuthProviderResponse struct {
Id int `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Icon string `json:"icon"`
Enabled bool `json:"enabled"`
ClientId string `json:"client_id"`
AuthorizationEndpoint string `json:"authorization_endpoint"`
TokenEndpoint string `json:"token_endpoint"`
UserInfoEndpoint string `json:"user_info_endpoint"`
Scopes string `json:"scopes"`
UserIdField string `json:"user_id_field"`
UsernameField string `json:"username_field"`
DisplayNameField string `json:"display_name_field"`
EmailField string `json:"email_field"`
WellKnown string `json:"well_known"`
AuthStyle int `json:"auth_style"`
AccessPolicy string `json:"access_policy"`
AccessDeniedMessage string `json:"access_denied_message"`
}
CustomOAuthProviderResponse is the response structure for custom OAuth providers It excludes sensitive fields like client_secret
type DeepSeekUsageResponse ¶
type DiscordResponse ¶
type DiscordUser ¶
type DiskCacheInfo ¶
type DiskCacheInfo struct {
// 缓存目录路径
Path string `json:"path"`
// 目录是否存在
Exists bool `json:"exists"`
// 文件数量
FileCount int `json:"file_count"`
// 总大小(字节)
TotalSize int64 `json:"total_size"`
}
DiskCacheInfo 磁盘缓存目录信息
type EpayRequest ¶
type GitHubOAuthResponse ¶
type GitHubUser ¶
type KlingCameraConfig ¶
type KlingCameraConfig struct {
Horizontal float64 `json:"horizontal,omitempty" example:"2.5"`
Vertical float64 `json:"vertical,omitempty" example:"0"`
Pan float64 `json:"pan,omitempty" example:"0"`
Tilt float64 `json:"tilt,omitempty" example:"0"`
Roll float64 `json:"roll,omitempty" example:"0"`
Zoom float64 `json:"zoom,omitempty" example:"0"`
}
type KlingCameraControl ¶
type KlingCameraControl struct {
Type string `json:"type,omitempty" example:"simple"`
Config *KlingCameraConfig `json:"config,omitempty"`
}
type KlingImage2VideoRequest ¶
type KlingImage2VideoRequest struct {
ModelName string `json:"model_name,omitempty" example:"kling-v2-master"`
Image string `` /* 181-byte string literal not displayed */
Prompt string `json:"prompt,omitempty" example:"A cat playing piano in the garden"`
NegativePrompt string `json:"negative_prompt,omitempty" example:"blurry, low quality"`
CfgScale float64 `json:"cfg_scale,omitempty" example:"0.7"`
Mode string `json:"mode,omitempty" example:"std"`
CameraControl *KlingCameraControl `json:"camera_control,omitempty"`
AspectRatio string `json:"aspect_ratio,omitempty" example:"16:9"`
Duration string `json:"duration,omitempty" example:"5"`
CallbackURL string `json:"callback_url,omitempty" example:"https://your.domain/callback"`
ExternalTaskId string `json:"external_task_id,omitempty" example:"custom-task-002"`
}
type KlingText2VideoRequest ¶
type KlingText2VideoRequest struct {
ModelName string `json:"model_name,omitempty" example:"kling-v1"`
Prompt string `json:"prompt" binding:"required" example:"A cat playing piano in the garden"`
NegativePrompt string `json:"negative_prompt,omitempty" example:"blurry, low quality"`
CfgScale float64 `json:"cfg_scale,omitempty" example:"0.7"`
Mode string `json:"mode,omitempty" example:"std"`
CameraControl *KlingCameraControl `json:"camera_control,omitempty"`
AspectRatio string `json:"aspect_ratio,omitempty" example:"16:9"`
Duration string `json:"duration,omitempty" example:"5"`
CallbackURL string `json:"callback_url,omitempty" example:"https://your.domain/callback"`
ExternalTaskId string `json:"external_task_id,omitempty" example:"custom-task-001"`
}
type LinuxdoUser ¶
type LogFileInfo ¶
type LogFileInfo struct {
Name string `json:"name"`
Size int64 `json:"size"`
ModTime time.Time `json:"mod_time"`
}
LogFileInfo 日志文件信息
type LogFilesResponse ¶
type LogFilesResponse struct {
LogDir string `json:"log_dir"`
Enabled bool `json:"enabled"`
FileCount int `json:"file_count"`
TotalSize int64 `json:"total_size"`
OldestTime *time.Time `json:"oldest_time,omitempty"`
NewestTime *time.Time `json:"newest_time,omitempty"`
Files []LogFileInfo `json:"files"`
}
LogFilesResponse 日志文件列表响应
type LoginRequest ¶
type ManageRequest ¶
type MemoryStats ¶
type MemoryStats struct {
// 已分配内存(字节)
Alloc uint64 `json:"alloc"`
// 总分配内存(字节)
TotalAlloc uint64 `json:"total_alloc"`
// 系统内存(字节)
Sys uint64 `json:"sys"`
// GC 次数
NumGC uint32 `json:"num_gc"`
// Goroutine 数量
NumGoroutine int `json:"num_goroutine"`
}
MemoryStats 内存统计
type MultiKeyManageRequest ¶
type MultiKeyManageRequest struct {
ChannelId int `json:"channel_id"`
Action string `json:"action"` // "disable_key", "enable_key", "delete_key", "delete_disabled_keys", "get_key_status"
KeyIndex *int `json:"key_index,omitempty"` // for disable_key, enable_key, and delete_key actions
Page int `json:"page,omitempty"` // for get_key_status pagination
PageSize int `json:"page_size,omitempty"` // for get_key_status pagination
Status *int `json:"status,omitempty"` // for get_key_status filtering: 1=enabled, 2=manual_disabled, 3=auto_disabled, nil=all
}
MultiKeyManageRequest represents the request for multi-key management operations
type MultiKeyStatusResponse ¶
type MultiKeyStatusResponse struct {
Keys []KeyStatus `json:"keys"`
Total int `json:"total"`
Page int `json:"page"`
PageSize int `json:"page_size"`
TotalPages int `json:"total_pages"`
// Statistics
EnabledCount int `json:"enabled_count"`
ManualDisabledCount int `json:"manual_disabled_count"`
AutoDisabledCount int `json:"auto_disabled_count"`
}
MultiKeyStatusResponse represents the response for key status query
type OAuthRegistrationDisabledError ¶
type OAuthRegistrationDisabledError struct{}
func (*OAuthRegistrationDisabledError) Error ¶
func (e *OAuthRegistrationDisabledError) Error() string
type OAuthUserDeletedError ¶
type OAuthUserDeletedError struct{}
Error types for OAuth
func (*OAuthUserDeletedError) Error ¶
func (e *OAuthUserDeletedError) Error() string
type OidcResponse ¶
type OpenAICreditGrants ¶
type OpenAIModel ¶
type OpenAIModel struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
OwnedBy string `json:"owned_by"`
Metadata map[string]any `json:"metadata,omitempty"`
Permission []struct {
ID string `json:"id"`
Object string `json:"object"`
Created int64 `json:"created"`
AllowCreateEngine bool `json:"allow_create_engine"`
AllowSampling bool `json:"allow_sampling"`
AllowLogprobs bool `json:"allow_logprobs"`
AllowSearchIndices bool `json:"allow_search_indices"`
AllowView bool `json:"allow_view"`
AllowFineTuning bool `json:"allow_fine_tuning"`
Organization string `json:"organization"`
Group string `json:"group"`
IsBlocking bool `json:"is_blocking"`
} `json:"permission"`
Root string `json:"root"`
Parent string `json:"parent"`
}
type OpenAIModelsResponse ¶
type OpenAIModelsResponse struct {
Data []OpenAIModel `json:"data"`
Success bool `json:"success"`
}
type OpenAISBUsageResponse ¶
type OpenAISubscriptionResponse ¶
type OpenAISubscriptionResponse struct {
Object string `json:"object"`
HasPaymentMethod bool `json:"has_payment_method"`
SoftLimitUSD float64 `json:"soft_limit_usd"`
HardLimitUSD float64 `json:"hard_limit_usd"`
SystemHardLimitUSD float64 `json:"system_hard_limit_usd"`
AccessUntil int64 `json:"access_until"`
}
type OpenAIUsageDailyCost ¶
type OpenAIUsageResponse ¶
type OptionUpdateRequest ¶
type PasswordResetRequest ¶
type PatchChannel ¶
type PaymentComplianceRequest ¶
type PaymentComplianceRequest struct {
Confirmed bool `json:"confirmed"`
}
type PerformanceConfig ¶
type PerformanceConfig struct {
// 是否启用磁盘缓存
DiskCacheEnabled bool `json:"disk_cache_enabled"`
// 磁盘缓存阈值(MB)
DiskCacheThresholdMB int `json:"disk_cache_threshold_mb"`
// 磁盘缓存最大大小(MB)
DiskCacheMaxSizeMB int `json:"disk_cache_max_size_mb"`
// 磁盘缓存路径
DiskCachePath string `json:"disk_cache_path"`
// 是否在容器中运行
IsRunningInContainer bool `json:"is_running_in_container"`
// MonitorEnabled 是否启用性能监控
MonitorEnabled bool `json:"monitor_enabled"`
// MonitorCPUThreshold CPU 使用率阈值(%)
MonitorCPUThreshold int `json:"monitor_cpu_threshold"`
// MonitorMemoryThreshold 内存使用率阈值(%)
MonitorMemoryThreshold int `json:"monitor_memory_threshold"`
// MonitorDiskThreshold 磁盘使用率阈值(%)
MonitorDiskThreshold int `json:"monitor_disk_threshold"`
}
PerformanceConfig 性能配置
type PerformanceStats ¶
type PerformanceStats struct {
// 缓存统计
CacheStats common.DiskCacheStats `json:"cache_stats"`
// 系统内存统计
MemoryStats MemoryStats `json:"memory_stats"`
// 磁盘缓存目录信息
DiskCacheInfo DiskCacheInfo `json:"disk_cache_info"`
// 磁盘空间信息
DiskSpaceInfo common.DiskSpaceInfo `json:"disk_space_info"`
// 配置信息
Config PerformanceConfig `json:"config"`
}
PerformanceStats 性能统计信息
type Setup2FARequest ¶
type Setup2FARequest struct {
Code string `json:"code" binding:"required"`
}
Setup2FARequest 设置2FA请求结构
type Setup2FAResponse ¶
type Setup2FAResponse struct {
Secret string `json:"secret"`
QRCodeData string `json:"qr_code_data"`
BackupCodes []string `json:"backup_codes"`
}
Setup2FAResponse 设置2FA响应结构
type SetupRequest ¶
type SiliconFlowUsageResponse ¶
type SiliconFlowUsageResponse struct {
Code int `json:"code"`
Message string `json:"message"`
Status bool `json:"status"`
Data struct {
ID string `json:"id"`
Name string `json:"name"`
Image string `json:"image"`
Email string `json:"email"`
IsAdmin bool `json:"isAdmin"`
Balance string `json:"balance"`
Status string `json:"status"`
Introduction string `json:"introduction"`
Role string `json:"role"`
ChargeBalance string `json:"chargeBalance"`
TotalBalance string `json:"totalBalance"`
Category string `json:"category"`
} `json:"data"`
}
type StripeAdaptor ¶
type StripeAdaptor struct {
}
func (*StripeAdaptor) RequestAmount ¶
func (*StripeAdaptor) RequestAmount(c *gin.Context, req *StripePayRequest)
func (*StripeAdaptor) RequestPay ¶
func (*StripeAdaptor) RequestPay(c *gin.Context, req *StripePayRequest)
type StripePayRequest ¶
type StripePayRequest struct {
// Amount is the quantity of units to purchase.
Amount int64 `json:"amount"`
// PaymentMethod specifies the payment method (e.g., "stripe").
PaymentMethod string `json:"payment_method"`
// SuccessURL is the optional custom URL to redirect after successful payment.
// If empty, defaults to the server's console log page.
SuccessURL string `json:"success_url,omitempty"`
// CancelURL is the optional custom URL to redirect when payment is canceled.
// If empty, defaults to the server's console topup page.
CancelURL string `json:"cancel_url,omitempty"`
}
StripePayRequest represents a payment request for Stripe checkout.
type SubscriptionBalancePayRequest ¶
type SubscriptionBalancePayRequest struct {
PlanId int `json:"plan_id"`
}
type SubscriptionCreemPayRequest ¶
type SubscriptionCreemPayRequest struct {
PlanId int `json:"plan_id"`
}
type SubscriptionPlanDTO ¶
type SubscriptionPlanDTO struct {
Plan model.SubscriptionPlan `json:"plan"`
}
type SubscriptionStripePayRequest ¶
type SubscriptionStripePayRequest struct {
PlanId int `json:"plan_id"`
}
type SubscriptionWaffoPancakePayRequest ¶
type SubscriptionWaffoPancakePayRequest struct {
PlanId int `json:"plan_id"`
}
type TieredBillingConfigItem ¶
type TieredBillingUpdateRequest ¶
type TieredBillingUpdateRequest struct {
Config map[string]TieredBillingConfigItem `json:"config"`
}
type TokenBatch ¶
type TokenBatch struct {
Ids []int `json:"ids"`
}
type TransferAffQuotaRequest ¶
type TransferAffQuotaRequest struct {
Quota int `json:"quota" binding:"required"`
}
type UniversalVerifyRequest ¶
type UpdateCustomOAuthProviderRequest ¶
type UpdateCustomOAuthProviderRequest struct {
Name string `json:"name"`
Slug string `json:"slug"`
Icon *string `json:"icon"` // Optional: if nil, keep existing
Enabled *bool `json:"enabled"` // Optional: if nil, keep existing
ClientId string `json:"client_id"`
ClientSecret string `json:"client_secret"` // Optional: if empty, keep existing
AuthorizationEndpoint string `json:"authorization_endpoint"`
TokenEndpoint string `json:"token_endpoint"`
UserInfoEndpoint string `json:"user_info_endpoint"`
Scopes string `json:"scopes"`
UserIdField string `json:"user_id_field"`
UsernameField string `json:"username_field"`
DisplayNameField string `json:"display_name_field"`
EmailField string `json:"email_field"`
WellKnown *string `json:"well_known"` // Optional: if nil, keep existing
AuthStyle *int `json:"auth_style"` // Optional: if nil, keep existing
AccessPolicy *string `json:"access_policy"` // Optional: if nil, keep existing
AccessDeniedMessage *string `json:"access_denied_message"` // Optional: if nil, keep existing
}
UpdateCustomOAuthProviderRequest is the request structure for updating a custom OAuth provider
type UpdateUserSettingRequest ¶
type UpdateUserSettingRequest struct {
QuotaWarningType string `json:"notify_type"`
QuotaWarningThreshold float64 `json:"quota_warning_threshold"`
WebhookUrl string `json:"webhook_url,omitempty"`
WebhookSecret string `json:"webhook_secret,omitempty"`
NotificationEmail string `json:"notification_email,omitempty"`
BarkUrl string `json:"bark_url,omitempty"`
GotifyUrl string `json:"gotify_url,omitempty"`
GotifyToken string `json:"gotify_token,omitempty"`
GotifyPriority int `json:"gotify_priority,omitempty"`
UpstreamModelUpdateNotifyEnabled *bool `json:"upstream_model_update_notify_enabled,omitempty"`
AcceptUnsetModelRatioModel bool `json:"accept_unset_model_ratio_model"`
RecordIpLog bool `json:"record_ip_log"`
}
type UptimeGroupResult ¶
type Verify2FARequest ¶
type Verify2FARequest struct {
Code string `json:"code" binding:"required"`
}
Verify2FARequest 验证2FA请求结构
type WaffoPancakePayRequest ¶
type WaffoPancakePayRequest struct {
Amount int64 `json:"amount"`
}
type WaffoPayRequest ¶
type WaffoPayRequest struct {
Amount int64 `json:"amount"`
PayMethodIndex *int `json:"pay_method_index"` // 服务端支付方式列表的索引,nil 表示由 Waffo 自动选择
PayMethodType string `json:"pay_method_type"` // Deprecated: 兼容旧前端,优先使用 pay_method_index
PayMethodName string `json:"pay_method_name"` // Deprecated: 兼容旧前端,优先使用 pay_method_index
}
Source Files
¶
- audit.go
- billing.go
- channel-billing.go
- channel-test.go
- channel.go
- channel_affinity_cache.go
- channel_upstream_update.go
- checkin.go
- codex_oauth.go
- codex_usage.go
- console_migrate.go
- custom_oauth.go
- deployment.go
- discord.go
- github.go
- group.go
- image.go
- linuxdo.go
- log.go
- midjourney.go
- misc.go
- missing_models.go
- model.go
- model_meta.go
- model_sync.go
- oauth.go
- oidc.go
- option.go
- passkey.go
- payment_compliance.go
- payment_webhook_availability.go
- perf_metrics.go
- performance.go
- playground.go
- prefill_group.go
- pricing.go
- rankings.go
- ratio_config.go
- ratio_sync.go
- redemption.go
- relay.go
- return_path.go
- secure_verification.go
- setup.go
- subscription.go
- subscription_payment_creem.go
- subscription_payment_epay.go
- subscription_payment_stripe.go
- subscription_payment_waffo_pancake.go
- swag_video.go
- system_info.go
- system_task.go
- task.go
- task_video.go
- telegram.go
- tiered_billing.go
- token.go
- topup.go
- topup_creem.go
- topup_stripe.go
- topup_waffo.go
- topup_waffo_pancake.go
- twofa.go
- uptime_kuma.go
- usedata.go
- user.go
- vendor_meta.go
- video_proxy.go
- video_proxy_gemini.go
- wechat.go