删除服务端材质渲染功能及system_config表,转为环境变量配置,初步配置管理员功能
This commit is contained in:
@@ -136,69 +136,6 @@ type SecurityService interface {
|
||||
ClearVerifyAttempts(ctx context.Context, email, codeType string) error
|
||||
}
|
||||
|
||||
// TextureRenderService 纹理渲染服务接口
|
||||
type TextureRenderService interface {
|
||||
// RenderTexture 渲染纹理为预览图
|
||||
RenderTexture(ctx context.Context, textureID int64, renderType RenderType, size int, format ImageFormat) (*RenderResult, error)
|
||||
// RenderTextureFromData 从原始数据渲染纹理
|
||||
RenderTextureFromData(ctx context.Context, textureData []byte, renderType RenderType, size int, format ImageFormat, isSlim bool) ([]byte, string, error)
|
||||
// GetRenderURL 获取渲染图的URL
|
||||
GetRenderURL(textureID int64, renderType RenderType, size int, format ImageFormat) string
|
||||
// DeleteRenderCache 删除渲染缓存
|
||||
DeleteRenderCache(ctx context.Context, textureID int64) error
|
||||
// RenderAvatar 渲染头像(支持2D/3D模式)
|
||||
RenderAvatar(ctx context.Context, textureID int64, size int, mode AvatarMode, format ImageFormat) (*RenderResult, error)
|
||||
// RenderCape 渲染披风
|
||||
RenderCape(ctx context.Context, textureID int64, size int, format ImageFormat) (*RenderResult, error)
|
||||
// RenderPreview 渲染预览图(类似Blessing Skin的preview功能)
|
||||
RenderPreview(ctx context.Context, textureID int64, size int, format ImageFormat) (*RenderResult, error)
|
||||
}
|
||||
|
||||
// RenderType 渲染类型
|
||||
type RenderType string
|
||||
|
||||
const (
|
||||
RenderTypeFront RenderType = "front" // 正面
|
||||
RenderTypeBack RenderType = "back" // 背面
|
||||
RenderTypeFull RenderType = "full" // 全身
|
||||
RenderTypeHead RenderType = "head" // 头像
|
||||
RenderTypeIsometric RenderType = "isometric" // 等距视图
|
||||
)
|
||||
|
||||
// ImageFormat 输出格式
|
||||
type ImageFormat string
|
||||
|
||||
const (
|
||||
ImageFormatPNG ImageFormat = "png"
|
||||
ImageFormatWEBP ImageFormat = "webp"
|
||||
)
|
||||
|
||||
// AvatarMode 头像模式
|
||||
type AvatarMode string
|
||||
|
||||
const (
|
||||
AvatarMode2D AvatarMode = "2d" // 2D头像
|
||||
AvatarMode3D AvatarMode = "3d" // 3D头像
|
||||
)
|
||||
|
||||
// TextureType 纹理类型
|
||||
type TextureType string
|
||||
|
||||
const (
|
||||
TextureTypeSteve TextureType = "steve" // Steve皮肤
|
||||
TextureTypeAlex TextureType = "alex" // Alex皮肤
|
||||
TextureTypeCape TextureType = "cape" // 披风
|
||||
)
|
||||
|
||||
// RenderResult 渲染结果(附带缓存/HTTP头信息)
|
||||
type RenderResult struct {
|
||||
URL string
|
||||
ContentType string
|
||||
ETag string
|
||||
LastModified time.Time
|
||||
Size int64
|
||||
}
|
||||
|
||||
// Services 服务集合
|
||||
type Services struct {
|
||||
User UserService
|
||||
|
||||
Reference in New Issue
Block a user