Documentation
¶
Overview ¶
Package windows HTTP 处理器
Package windows Windows 应用模块 (Wine)
Package windows Windows 服务 ¶
Package windows Windows 类型定义
Index ¶
- type AddAppRequest
- type App
- type AppStatus
- type CreatePrefixRequest
- type Handler
- func (h *Handler) AddApp(c *gin.Context)
- func (h *Handler) CreatePrefix(c *gin.Context)
- func (h *Handler) DeleteApp(c *gin.Context)
- func (h *Handler) DeletePrefix(c *gin.Context)
- func (h *Handler) GetApp(c *gin.Context)
- func (h *Handler) GetApps(c *gin.Context)
- func (h *Handler) GetPrefix(c *gin.Context)
- func (h *Handler) GetPrefixes(c *gin.Context)
- func (h *Handler) GetSessions(c *gin.Context)
- func (h *Handler) GetStoreApps(c *gin.Context)
- func (h *Handler) GetWineInfo(c *gin.Context)
- func (h *Handler) InstallApp(c *gin.Context)
- func (h *Handler) LaunchApp(c *gin.Context)
- func (h *Handler) RegisterRoutes(r *gin.RouterGroup)
- func (h *Handler) RunExe(c *gin.Context)
- func (h *Handler) RunWinetricks(c *gin.Context)
- func (h *Handler) StopSession(c *gin.Context)
- func (h *Handler) UpdateApp(c *gin.Context)
- type InstallAppRequest
- type LaunchRequest
- type Module
- func (m *Module) Dependencies() []string
- func (m *Module) ID() string
- func (m *Module) Init(ctx *module.Context) error
- func (m *Module) Name() string
- func (m *Module) RegisterRoutes(group *gin.RouterGroup)
- func (m *Module) Start() error
- func (m *Module) Stop() error
- func (m *Module) Version() string
- type RunExeRequest
- type Service
- func (s *Service) AddApp(req AddAppRequest) (*App, error)
- func (s *Service) CreatePrefix(req CreatePrefixRequest) (*WinePrefix, error)
- func (s *Service) DeleteApp(id string) error
- func (s *Service) DeletePrefix(id string) error
- func (s *Service) GetApp(id string) (*App, error)
- func (s *Service) GetApps(prefixID string) []*App
- func (s *Service) GetPrefix(id string) (*WinePrefix, error)
- func (s *Service) GetPrefixes() []*WinePrefix
- func (s *Service) GetSessions() []*Session
- func (s *Service) GetStoreApps() []StoreApp
- func (s *Service) GetWineInfo() *WineInfo
- func (s *Service) InstallApp(req InstallAppRequest) (*App, error)
- func (s *Service) LaunchApp(req LaunchRequest) (*Session, error)
- func (s *Service) RunExe(req RunExeRequest) (*Session, error)
- func (s *Service) RunWinetricks(req WinetricksRequest) error
- func (s *Service) Start() error
- func (s *Service) Stop()
- func (s *Service) StopSession(id string) error
- func (s *Service) UpdateApp(id string, req UpdateAppRequest) (*App, error)
- type Session
- type StoreApp
- type UpdateAppRequest
- type WineConfig
- type WineInfo
- type WinePrefix
- type WinetricksRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddAppRequest ¶
type AddAppRequest struct {
PrefixID string `json:"prefix_id" binding:"required"`
Name string `json:"name" binding:"required"`
ExePath string `json:"exe_path" binding:"required"`
WorkDir string `json:"work_dir,omitempty"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
AddAppRequest 添加应用请求
type App ¶
type App struct {
ID string `json:"id"`
Name string `json:"name"`
PrefixID string `json:"prefix_id"`
ExePath string `json:"exe_path"`
WorkDir string `json:"work_dir,omitempty"`
Icon string `json:"icon,omitempty"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
Status AppStatus `json:"status"`
InstalledAt time.Time `json:"installed_at"`
}
App Windows 应用
type CreatePrefixRequest ¶
type CreatePrefixRequest struct {
Name string `json:"name" binding:"required"`
Arch string `json:"arch,omitempty"` // win32, win64
WindowsVer string `json:"windows_version,omitempty"`
}
CreatePrefixRequest 创建前缀请求
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler HTTP 处理器
func (*Handler) RegisterRoutes ¶
func (h *Handler) RegisterRoutes(r *gin.RouterGroup)
RegisterRoutes 注册路由
func (*Handler) RunWinetricks ¶
RunWinetricks 运行 Winetricks
type InstallAppRequest ¶
type InstallAppRequest struct {
PrefixID string `json:"prefix_id" binding:"required"`
InstallerPath string `json:"installer_path" binding:"required"`
Name string `json:"name,omitempty"`
Silent bool `json:"silent,omitempty"`
}
InstallAppRequest 安装应用请求
type LaunchRequest ¶
type LaunchRequest struct {
AppID string `json:"app_id" binding:"required"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
LaunchRequest 启动请求
type Module ¶
type Module struct {
// contains filtered or unexported fields
}
Module Windows 模块
func (*Module) Dependencies ¶
func (*Module) RegisterRoutes ¶
func (m *Module) RegisterRoutes(group *gin.RouterGroup)
RegisterRoutes 注册路由
type RunExeRequest ¶
type RunExeRequest struct {
PrefixID string `json:"prefix_id" binding:"required"`
ExePath string `json:"exe_path" binding:"required"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
RunExeRequest 运行 EXE 请求
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service Windows 服务
func (*Service) CreatePrefix ¶
func (s *Service) CreatePrefix(req CreatePrefixRequest) (*WinePrefix, error)
CreatePrefix 创建前缀
func (*Service) GetPrefix ¶
func (s *Service) GetPrefix(id string) (*WinePrefix, error)
GetPrefix 获取前缀
func (*Service) InstallApp ¶
func (s *Service) InstallApp(req InstallAppRequest) (*App, error)
InstallApp 安装应用
func (*Service) LaunchApp ¶
func (s *Service) LaunchApp(req LaunchRequest) (*Session, error)
LaunchApp 启动应用
func (*Service) RunExe ¶
func (s *Service) RunExe(req RunExeRequest) (*Session, error)
RunExe 运行 EXE
func (*Service) RunWinetricks ¶
func (s *Service) RunWinetricks(req WinetricksRequest) error
RunWinetricks 运行 Winetricks
type Session ¶
type Session struct {
ID string `json:"id"`
AppID string `json:"app_id"`
AppName string `json:"app_name"`
PrefixID string `json:"prefix_id"`
PID int `json:"pid"`
Display int `json:"display"`
Port int `json:"port"`
Status AppStatus `json:"status"`
StartedAt time.Time `json:"started_at"`
}
Session 运行会话
type StoreApp ¶
type StoreApp struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Icon string `json:"icon,omitempty"`
Category string `json:"category,omitempty"`
Version string `json:"version,omitempty"`
Source string `json:"source,omitempty"`
Script string `json:"script,omitempty"`
Verbs []string `json:"verbs,omitempty"`
}
StoreApp 应用商店应用
type UpdateAppRequest ¶
type UpdateAppRequest struct {
Name string `json:"name,omitempty"`
ExePath string `json:"exe_path,omitempty"`
WorkDir string `json:"work_dir,omitempty"`
Args []string `json:"args,omitempty"`
Env map[string]string `json:"env,omitempty"`
}
UpdateAppRequest 更新应用请求
type WineConfig ¶
type WineConfig struct {
WindowsVersion string `json:"windows_version"`
DPI int `json:"dpi"`
VirtualDesktop string `json:"virtual_desktop,omitempty"` // 1024x768
DXVK bool `json:"dxvk"`
VKD3D bool `json:"vkd3d"`
Gallium9 bool `json:"gallium9"`
}
WineConfig Wine 配置
type WineInfo ¶
type WineInfo struct {
Version string `json:"version"`
Path string `json:"path"`
Arch string `json:"arch"`
WinetricksVer string `json:"winetricks_version,omitempty"`
DXVKVersion string `json:"dxvk_version,omitempty"`
}
WineInfo Wine 信息
type WinePrefix ¶
type WinePrefix struct {
ID string `json:"id"`
Name string `json:"name"`
Path string `json:"path"`
Arch string `json:"arch"` // win32, win64
WindowsVer string `json:"windows_version,omitempty"`
CreatedAt time.Time `json:"created_at"`
Size int64 `json:"size,omitempty"`
}
WinePrefix Wine 前缀
type WinetricksRequest ¶
type WinetricksRequest struct {
PrefixID string `json:"prefix_id" binding:"required"`
Verbs []string `json:"verbs" binding:"required"`
}
WinetricksRequest Winetricks 请求
Click to show internal directories.
Click to hide internal directories.