统一文件上传方式为直接上传,更新环境变量示例
This commit is contained in:
@@ -65,19 +65,6 @@ type ChangeEmailRequest struct {
|
||||
VerificationCode string `json:"verification_code" binding:"required,len=6" example:"123456"`
|
||||
}
|
||||
|
||||
// GenerateAvatarUploadURLRequest 生成头像上传URL请求
|
||||
type GenerateAvatarUploadURLRequest struct {
|
||||
FileName string `json:"file_name" binding:"required" example:"avatar.png"`
|
||||
}
|
||||
|
||||
// GenerateAvatarUploadURLResponse 生成头像上传URL响应
|
||||
type GenerateAvatarUploadURLResponse struct {
|
||||
PostURL string `json:"post_url" example:"https://rustfs.example.com/avatars"`
|
||||
FormData map[string]string `json:"form_data"`
|
||||
AvatarURL string `json:"avatar_url" example:"https://rustfs.example.com/avatars/user_1/xxx.png"`
|
||||
ExpiresIn int `json:"expires_in" example:"900"` // 秒
|
||||
}
|
||||
|
||||
// CreateProfileRequest 创建档案请求
|
||||
type CreateProfileRequest struct {
|
||||
Name string `json:"name" binding:"required,min=1,max=16" example:"PlayerName"`
|
||||
@@ -90,20 +77,6 @@ type UpdateTextureRequest struct {
|
||||
IsPublic *bool `json:"is_public" example:"true"`
|
||||
}
|
||||
|
||||
// GenerateTextureUploadURLRequest 生成材质上传URL请求
|
||||
type GenerateTextureUploadURLRequest struct {
|
||||
FileName string `json:"file_name" binding:"required" example:"skin.png"`
|
||||
TextureType TextureType `json:"texture_type" binding:"required,oneof=SKIN CAPE" example:"SKIN"`
|
||||
}
|
||||
|
||||
// GenerateTextureUploadURLResponse 生成材质上传URL响应
|
||||
type GenerateTextureUploadURLResponse struct {
|
||||
PostURL string `json:"post_url" example:"https://rustfs.example.com/textures"`
|
||||
FormData map[string]string `json:"form_data"`
|
||||
TextureURL string `json:"texture_url" example:"https://rustfs.example.com/textures/user_1/skin/xxx.png"`
|
||||
ExpiresIn int `json:"expires_in" example:"900"` // 秒
|
||||
}
|
||||
|
||||
// LoginResponse 登录响应
|
||||
type LoginResponse struct {
|
||||
Token string `json:"token"`
|
||||
@@ -177,18 +150,6 @@ type UploadURLResponse struct {
|
||||
ExpiresIn int `json:"expires_in"`
|
||||
}
|
||||
|
||||
// CreateTextureRequest 创建材质请求
|
||||
type CreateTextureRequest struct {
|
||||
Name string `json:"name" binding:"required,min=1,max=100" example:"My Cool Skin"`
|
||||
Description string `json:"description" binding:"max=500" example:"A very cool skin"`
|
||||
Type TextureType `json:"type" binding:"required,oneof=SKIN CAPE" example:"SKIN"`
|
||||
URL string `json:"url" binding:"required,url" example:"https://rustfs.example.com/textures/user_1/skin/xxx.png"`
|
||||
Hash string `json:"hash" binding:"required,len=64" example:"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"`
|
||||
Size int `json:"size" binding:"required,min=1" example:"2048"`
|
||||
IsPublic bool `json:"is_public" example:"true"`
|
||||
IsSlim bool `json:"is_slim" example:"false"` // Alex模型(细臂)为true,Steve模型(粗臂)为false
|
||||
}
|
||||
|
||||
// SearchTextureRequest 搜索材质请求
|
||||
type SearchTextureRequest struct {
|
||||
PaginationRequest
|
||||
|
||||
Reference in New Issue
Block a user