feat: add direct s3 upload flow

This commit is contained in:
2026-05-13 11:24:13 -07:00
parent f6911965dc
commit 4fa9fcd232
16 changed files with 773 additions and 106 deletions
+125 -35
View File
@@ -1,8 +1,12 @@
// Code generated by goctl. DO NOT EDIT.
// goctl 1.7.2
// goctl 1.9.2
package types
type ActivateOrderRequest struct {
OrderNo string `json:"order_no" validate:"required"`
}
type Ads struct {
Id int `json:"id"`
Title string `json:"title"`
@@ -295,6 +299,13 @@ type ConnectionRecords struct {
LongestSingleConnection int64 `json:"longest_single_connection"`
}
type ContactRequest struct {
Name string `json:"name" validate:"required,max=100"`
Email string `json:"email" validate:"required,email"`
OtherContact string `json:"other_contact" validate:"max=200"`
Notes string `json:"notes" validate:"max=2000"`
}
type Coupon struct {
Id int64 `json:"id"`
Name string `json:"name"`
@@ -549,6 +560,13 @@ type CurrencyConfig struct {
CurrencySymbol string `json:"currency_symbol"`
}
type DailyTrafficStats struct {
Date string `json:"date"`
Upload int64 `json:"upload"`
Download int64 `json:"download"`
Total int64 `json:"total"`
}
type DeleteAccountRequest struct {
Email string `json:"email" validate:"required,email"`
Code string `json:"code" validate:"required"`
@@ -561,13 +579,6 @@ type DeleteAccountResponse struct {
Code int64 `json:"code"`
}
type DailyTrafficStats struct {
Date string `json:"date"`
Upload int64 `json:"upload"`
Download int64 `json:"download"`
Total int64 `json:"total"`
}
type DeleteAdsRequest struct {
Id int64 `json:"id"`
}
@@ -689,8 +700,15 @@ type EmailAuthticateConfig struct {
DomainSuffixList string `json:"domain_suffix_list"`
}
type ExportGroupResultRequest struct {
HistoryId *int64 `form:"history_id,omitempty"`
type EmailLoginRequest struct {
Identifier string `json:"identifier" form:"identifier"`
Email string `json:"email" form:"email" validate:"required,email"`
Code string `json:"code" form:"code" validate:"required"`
Invite string `json:"invite,optional" form:"invite"`
IP string `header:"X-Original-Forwarded-For"`
UserAgent string `header:"User-Agent"`
LoginType string `header:"Login-Type"`
CfToken string `json:"cf_token,optional" form:"cf_token"`
}
type ErrorLogMessage struct {
@@ -708,6 +726,10 @@ type ErrorLogMessage struct {
CreatedAt int64 `json:"created_at"`
}
type ExportGroupResultRequest struct {
HistoryId *int64 `form:"history_id,omitempty"`
}
type FamilyDetail struct {
Summary FamilySummary `json:"summary"`
Members []FamilyMemberItem `json:"members"`
@@ -740,6 +762,36 @@ type FamilySummary struct {
UpdatedAt int64 `json:"updated_at"`
}
type FileUploadCompleteRequest struct {
FileId string `json:"file_id" validate:"required"`
}
type FileUploadCompleteResponse struct {
FileId string `json:"file_id"`
ObjectKey string `json:"object_key"`
Size int64 `json:"size"`
ContentType string `json:"content_type"`
Etag string `json:"etag"`
Status string `json:"status"`
}
type FileUploadInitRequest struct {
BizType string `json:"biz_type" validate:"required"`
FileName string `json:"file_name" validate:"required"`
ContentType string `json:"content_type" validate:"required"`
Size int64 `json:"size" validate:"required"`
Sha256 string `json:"sha256"`
}
type FileUploadInitResponse struct {
FileId string `json:"file_id"`
ObjectKey string `json:"object_key"`
UploadURL string `json:"upload_url"`
Method string `json:"method"`
Headers map[string]string `json:"headers"`
ExpiredAt int64 `json:"expired_at"`
}
type FilterBalanceLogRequest struct {
FilterLogParams
UserId int64 `form:"user_id,optional"`
@@ -1048,6 +1100,15 @@ type GetDocumentListResponse struct {
List []Document `json:"list"`
}
type GetDownloadLinkRequest struct {
InviteCode string `form:"invite_code,optional"`
Platform string `form:"platform" validate:"required,oneof=windows mac ios android"`
}
type GetDownloadLinkResponse struct {
Url string `json:"url"`
}
type GetErrorLogMessageDetailResponse struct {
Id int64 `json:"id"`
Platform string `json:"platform"`
@@ -1118,18 +1179,6 @@ type GetGlobalConfigResponse struct {
WebAd bool `json:"web_ad"`
}
type GetInviteSalesRequest struct {
Page int `form:"page"`
Size int `form:"size"`
StartTime int64 `form:"start_time"`
EndTime int64 `form:"end_time"`
}
type GetInviteSalesResponse struct {
Total int64 `json:"total"`
List []InvitedUserSale `json:"list"`
}
type GetGroupConfigRequest struct {
Keys []string `form:"keys,omitempty"`
}
@@ -1161,6 +1210,18 @@ type GetGroupHistoryResponse struct {
List []GroupHistory `json:"list"`
}
type GetInviteSalesRequest struct {
Page int `form:"page"`
Size int `form:"size"`
StartTime int64 `form:"start_time"`
EndTime int64 `form:"end_time"`
}
type GetInviteSalesResponse struct {
Total int64 `json:"total"`
List []InvitedUserSale `json:"list"`
}
type GetLoginLogRequest struct {
Page int `form:"page"`
Size int `form:"size"`
@@ -1419,7 +1480,7 @@ type GetUserListRequest struct {
FamilyStatus string `form:"family_status,omitempty"`
FamilyOwnerUserId *int64 `form:"family_owner_user_id,omitempty"`
FamilyId *int64 `form:"family_id,omitempty"`
SortOrder string `form:"sort_order,omitempty"` // asc or desc, default desc
SortOrder string `form:"sort_order,omitempty"`
}
type GetUserListResponse struct {
@@ -1601,6 +1662,19 @@ type KickOfflineRequest struct {
Id int64 `json:"id"`
}
type LegacyCheckVerificationCodeRequest struct {
Method string `json:"method" form:"method" validate:"omitempty,oneof=email mobile"`
Account string `json:"account" form:"account"`
Email string `json:"email" form:"email"`
Code string `json:"code" form:"code" validate:"required"`
Type uint8 `json:"type" form:"type" validate:"required"`
}
type LegacyCheckVerificationCodeResponse struct {
Status bool `json:"status"`
Exist bool `json:"exist"`
}
type LogResponse struct {
List interface{} `json:"list"`
}
@@ -1765,8 +1839,8 @@ type Order struct {
TradeNo string `json:"trade_no"`
Status uint8 `json:"status"`
SubscribeId int64 `json:"subscribe_id"`
CreatedAt int64 `json:"created_at"` // Unix milliseconds
UpdatedAt int64 `json:"updated_at"` // Unix milliseconds
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
type OrderDetail struct {
@@ -1789,8 +1863,8 @@ type OrderDetail struct {
Status uint8 `json:"status"`
SubscribeId int64 `json:"subscribe_id"`
Subscribe Subscribe `json:"subscribe"`
CreatedAt int64 `json:"created_at"` // Unix milliseconds
UpdatedAt int64 `json:"updated_at"` // Unix milliseconds
CreatedAt int64 `json:"created_at"`
UpdatedAt int64 `json:"updated_at"`
}
type OrdersStatistics struct {
@@ -2246,6 +2320,10 @@ type RecoverOrderResponse struct {
Message string `json:"message"`
}
type RecoverySendCodeRequest struct {
Email string `json:"email" validate:"required,email"`
}
type RedeemCodeRequest struct {
Code string `json:"code" validate:"required"`
}
@@ -2319,6 +2397,26 @@ type RenewalOrderResponse struct {
AppAccountToken string `json:"app_account_token"`
}
type ReportLogMessageRequest struct {
Platform string `json:"platform" validate:"required,max=32"`
AppVersion string `json:"app_version" validate:"required,max=64"`
OsName string `json:"os_name" validate:"max=64"`
OsVersion string `json:"os_version" validate:"max=64"`
DeviceId string `json:"device_id" validate:"required,max=255"`
UserId int64 `json:"user_id"`
SessionId string `json:"session_id" validate:"max=255"`
Level uint8 `json:"level"`
ErrorCode string `json:"error_code" validate:"max=128"`
Message string `json:"message" validate:"required,max=65535"`
Stack string `json:"stack" validate:"max=1048576"`
Context interface{} `json:"context"`
OccurredAt int64 `json:"occurred_at"`
}
type ReportLogMessageResponse struct {
Id int64 `json:"id"`
}
type ResetAllSubscribeTokenResponse struct {
Success bool `json:"success"`
}
@@ -2370,10 +2468,6 @@ type ResetTrafficOrderResponse struct {
OrderNo string `json:"order_no"`
}
type RecoverySendCodeRequest struct {
Email string `json:"email" validate:"required,email"`
}
type ResetUserSubscribeTokenRequest struct {
UserSubscribeId int64 `json:"user_subscribe_id"`
}
@@ -3000,10 +3094,6 @@ type UpdateOrderStatusRequest struct {
TradeNo string `json:"trade_no,omitempty"`
}
type ActivateOrderRequest struct {
OrderNo string `json:"order_no" validate:"required"`
}
type UpdatePaymentMethodRequest struct {
Id int64 `json:"id" validate:"required"`
Name string `json:"name" validate:"required"`