Documentation
¶
Index ¶
- Constants
- func BuildQueryString(q interface{}) string
- type AddDaemonRequest
- type BaseRequest
- type BaseResponse
- type BaseSuccessResponse
- type BatchOperationQuery
- type BoolResponse
- type CPUMemChart
- type Chart
- type Client
- type CommonResponse
- type CompressFile
- type CompressMode
- type CopyFile
- type CopyFileRequest
- type CopyFileResponse
- type CreateFolder
- type CreateFolderRequest
- type CreateFolderRequestBody
- type CreateFolderResponse
- type CreateImageRequest
- type CreateInstanceResponse
- type CreateUserRequest
- type CreateUserResponse
- type CreatedUserData
- type DaemonConfigActionQuery
- type DaemonProcess
- type DaemonSystem
- type Data
- type DeleteFile
- type DeleteFileRequest
- type DeleteFileRequestBody
- type DeleteFileResponse
- type DeleteInstanceBody
- type DeleteInstancesResponse
- type DockerConfig
- type DockerContainer
- type DockerContainerList
- type DockerImage
- type DockerImageList
- type DockerNetwork
- type DockerNetworkList
- type DownloadFileRequest
- type DownloadFileResponse
- type FileContents
- type FileItem
- type FileSourceTargetPairs
- type FileTargets
- type FileType
- type GetBuildProgressResponse
- type GetContainerListResponse
- type GetFileContentsRequest
- type GetFileContentsRequestBody
- type GetFileContentsResponse
- type GetFileListRequest
- type GetFileListResponse
- type GetImageListRequest
- type GetImageListResponse
- type GetInstanceQuery
- type GetNetworkListResponse
- type Instance
- type InstanceConfig
- type InstanceDetail
- type InstanceDetailResponse
- type InstanceListResponse
- type InstanceStatus
- type KillInstanceQuery
- type KillInstanceResponse
- type ListInstancesQuery
- type MethodClient
- type MoveFile
- type MoveFileRequest
- type MoveFileResponse
- type PanelData
- type Process
- type Query
- type Record
- type Remote
- type RemoteCount
- type RequestChart
- type RestartInstanceQuery
- type RestartInstanceResponse
- type StartInstanceQuery
- type StartInstanceResponse
- type StopInstanceQuery
- type StopInstanceResponse
- type System
- type SystemChart
- type TargetedFile
- type TouchFile
- type TouchFileRequest
- type TouchFileRequestBody
- type TouchFileResponse
- type TryConnectDaemonQuery
- type UnzipFileResponse
- type UpdateConfigQuery
- type UpdateConfigResponse
- type UpdateFile
- type UpdateFileRequest
- type UpdateFileRequestBody
- type UpdateFileResponse
- type UpdateUserRequest
- type UploadFileRequest
- type UploadFileResponse
- type User
- type UserData
- type UserInstance
- type UserListData
- type UserListResponse
- type UserQueryParams
- type UserRole
- type ZipFileRequest
- type ZipFileRequestBody
- type ZipFileResponse
Constants ¶
const ( CompressModeZip CompressMode = 1 CompressModeTar CompressMode = 2 FileTypeFile FileType = 0 FileTypeFolder FileType = 1 )
const HTTPTimeout = 10
Variables ¶
This section is empty.
Functions ¶
func BuildQueryString ¶
func BuildQueryString(q interface{}) string
BuildQueryString constructs the URL-encoded query string
Types ¶
type AddDaemonRequest ¶
type BaseRequest ¶
BaseRequest includes common query parameters used across many request types
func (*BaseRequest) BuildQueryString ¶
func (q *BaseRequest) BuildQueryString() string
type BaseResponse ¶
type BaseSuccessResponse ¶ added in v1.0.2
type BatchOperationQuery ¶
type BatchOperationQuery struct {
InstanceUUID string `url:"instanceUuid"`
DaemonID string `url:"daemonId"`
}
BatchOperationQuery defines the query parameters for batch operations (start, stop, restart, kill).
func (*BatchOperationQuery) BuildQueryString ¶
func (q *BatchOperationQuery) BuildQueryString() string
type BoolResponse ¶
type BoolResponse struct {
Data bool `json:"data"`
CommonResponse
}
type CPUMemChart ¶
type CPUMemChart struct {
CPU float64 `json:"cpu"` // CPU usage percentage
Mem float64 `json:"mem"` // Memory usage percentage
}
CPUMemChart represents a single performance data point
type Chart ¶
type Chart struct {
System []SystemChart `json:"system"` // System resource charts (Memory&CPU usage on the panel)
Request []RequestChart `json:"request"` // Request statistics charts
}
Chart contains performance metrics for visualization
type Client ¶
type Client struct {
Dashboard *dashboardClient
Daemon *daemonClient
Instance *instanceClient
File *fileClient
User *userClient
Image *imageClient
// contains filtered or unexported fields
}
type CommonResponse ¶
type CommonResponse struct {
Time int64 `json:"time"`
}
type CompressFile ¶
type CompressFile struct {
Target *ZipFileRequest
FileData *ZipFileRequestBody
}
type CompressMode ¶
type CompressMode int
type CopyFile ¶
type CopyFile struct {
Target *CopyFileRequest
FileData *FileSourceTargetPairs
}
type CopyFileRequest ¶
type CopyFileRequest struct {
BaseRequest
}
func (*CopyFileRequest) BuildQueryString ¶
func (q *CopyFileRequest) BuildQueryString() string
type CopyFileResponse ¶
type CopyFileResponse BoolResponse
type CreateFolder ¶
type CreateFolder struct {
Target *CreateFolderRequest
Body *CreateFolderRequestBody
}
type CreateFolderRequest ¶
type CreateFolderRequest struct {
BaseRequest
}
func (*CreateFolderRequest) BuildQueryString ¶
func (q *CreateFolderRequest) BuildQueryString() string
type CreateFolderRequestBody ¶
type CreateFolderRequestBody TargetedFile
type CreateFolderResponse ¶
type CreateFolderResponse BoolResponse
type CreateImageRequest ¶ added in v1.0.2
type CreateImageRequest struct {
DockerFile string `json:"dockerFile"`
Name string `json:"name"`
Tag string `json:"tag"`
}
CreateImageRequest defines the request body for creating a Docker image.
type CreateInstanceResponse ¶
type CreateInstanceResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
Config *InstanceConfig `json:"config"`
} `json:"data"`
Time int64 `json:"time"`
}
CreateInstanceResponse represents the response structure after creating an instance.
type CreateUserRequest ¶
type CreateUserResponse ¶
type CreateUserResponse struct {
Status int `json:"status"`
Time int64 `json:"time"`
Data CreatedUserData `json:"data"`
}
type CreatedUserData ¶
type DaemonConfigActionQuery ¶
type DaemonConfigActionQuery struct {
UUID string `url:"uuid"`
}
func (*DaemonConfigActionQuery) BuildQueryString ¶
func (q *DaemonConfigActionQuery) BuildQueryString() string
type DaemonProcess ¶
type DaemonProcess struct {
CPU int `json:"cpu"` // CPU usage in nanoseconds
Memory int `json:"memory"` // Memory usage in bytes
Cwd string `json:"cwd"` // Current working directory
}
DaemonProcess contains daemon-specific process information
type DaemonSystem ¶
type DaemonSystem struct {
Type string `json:"type"` // OS type
Hostname string `json:"hostname"` // System hostname
Platform string `json:"platform"` // Platform identifier
Release string `json:"release"` // Kernel release version
Uptime float64 `json:"uptime"` // System uptime in seconds
Cwd string `json:"cwd"` // Current working directory
Loadavg []float64 `json:"loadavg"` // System load averages
Freemem int64 `json:"freemem"` // Free memory in bytes
CPUUsage float64 `json:"cpuUsage"` // Current CPU usage
MemUsage float64 `json:"memUsage"` // Current memory usage
Totalmem int64 `json:"totalmem"` // Total memory in bytes
ProcessCPU float64 `json:"processCpu"` // Process CPU usage
ProcessMem float64 `json:"processMem"` // Process memory usage
}
DaemonSystem contains detailed daemon host system info
type Data ¶
type Data struct {
Version string `json:"version"` // Panel software version
SpecifiedDaemonVersion string `json:"specifiedDaemonVersion"` // Required daemon version
Process Process `json:"process"` // Panel process information
Record Record `json:"record"` // Access statistics
System System `json:"system"` // Host system information
Chart Chart `json:"chart"` // Performance charts data
RemoteCount RemoteCount `json:"remoteCount"` // Daemon connection stats
Remote []Remote `json:"remote"` // List of connected daemons
}
Data contains all core panel information and metrics
type DeleteFile ¶
type DeleteFile struct {
Target *DeleteFileRequest
FileData *DeleteFileRequestBody
}
type DeleteFileRequest ¶
type DeleteFileRequest struct {
BaseRequest
}
func (*DeleteFileRequest) BuildQueryString ¶
func (q *DeleteFileRequest) BuildQueryString() string
type DeleteFileRequestBody ¶
type DeleteFileRequestBody FileTargets
type DeleteFileResponse ¶
type DeleteFileResponse BoolResponse
type DeleteInstanceBody ¶
type DeleteInstancesResponse ¶
type DeleteInstancesResponse struct {
Status int `json:"status"`
Data []string `json:"data"`
Time int64 `json:"time"`
}
DeleteInstancesResponse represents the response for deleting instances.
type DockerConfig ¶
type DockerConfig struct {
ContainerName string `json:"containerName"`
Image string `json:"image"`
Memory int `json:"memory"` // MB
Ports []string `json:"ports"`
ExtraVolumes []string `json:"extraVolumes"`
MaxSpace int `json:"maxSpace"`
Network int `json:"network"`
IO int `json:"io"`
NetworkMode string `json:"networkMode"`
NetworkAliases []string `json:"networkAliases"`
CpuSetCpus string `json:"cpusetCpus"`
CPUUsage int `json:"cpuUsage"`
WorkingDir string `json:"workingDir"`
Env []string `json:"env"`
}
DockerConfig represents the configuration for Docker-based instances.
type DockerContainer ¶ added in v1.0.2
type DockerContainer struct {
ID string `json:"id"`
Names []string `json:"names"`
Image string `json:"image"`
ImageID string `json:"imageID"`
State string `json:"state"`
Status string `json:"status"`
}
DockerContainer defines an individual Docker container.
type DockerContainerList ¶ added in v1.0.2
type DockerContainerList struct {
Containers []DockerContainer `json:"containers"`
}
DockerContainerList defines a list of Docker containers.
type DockerImage ¶
type DockerImage struct {
RepoTags []string `json:"repoTags"` // List of repository tags for the image
Size int64 `json:"size"` // Image size in bytes
Created string `json:"created"` // Creation date of the image
ID string `json:"id"` // Image ID
}
DockerImage defines an individual Docker image.
type DockerImageList ¶
type DockerImageList struct {
Images []DockerImage `json:"images"` // List of Docker images
}
DockerImageList defines a list of Docker images.
type DockerNetwork ¶ added in v1.0.2
type DockerNetwork struct {
ID string `json:"id"`
Name string `json:"name"`
Driver string `json:"driver"`
Scope string `json:"scope"`
IPAM any `json:"ipam"`
Labels any `json:"labels"`
Peers []string `json:"peers"`
}
DockerNetwork defines an individual Docker network.
type DockerNetworkList ¶ added in v1.0.2
type DockerNetworkList struct {
Networks []DockerNetwork `json:"networks"`
}
DockerNetworkList defines a list of Docker networks.
type DownloadFileRequest ¶
type DownloadFileRequest struct {
BaseRequest
FileName string `url:"file_name"`
}
func (*DownloadFileRequest) BuildQueryString ¶
func (q *DownloadFileRequest) BuildQueryString() string
type DownloadFileResponse ¶
type DownloadFileResponse struct {
Data struct {
Password string `json:"password"`
Addr string `json:"addr"`
} `json:"data"`
CommonResponse
}
type FileContents ¶
type FileContents struct {
Target *BaseRequest
File *GetFileContentsRequestBody
}
type FileSourceTargetPairs ¶
type FileSourceTargetPairs struct {
Targets [][2]string `json:"targets"` // source, target
}
type FileTargets ¶
type FileTargets struct {
Targets []string `json:"targets"` // List of file/folder paths
}
type GetBuildProgressResponse ¶ added in v1.0.2
type GetBuildProgressResponse struct {
Status int `json:"status"`
Data map[string]int `json:"data"` // image: status (-1 = Failed, 1 = Building, 2 = Complete)
Time int64 `json:"time"`
}
GetBuildProgressResponse defines the response structure for build progress.
type GetContainerListResponse ¶ added in v1.0.2
type GetContainerListResponse struct {
Data DockerContainerList `json:"data"`
Time int64 `json:"time"`
}
type GetFileContentsRequest ¶
type GetFileContentsRequest struct {
BaseRequest
}
func (*GetFileContentsRequest) BuildQueryString ¶
func (q *GetFileContentsRequest) BuildQueryString() string
type GetFileContentsRequestBody ¶
type GetFileContentsRequestBody TargetedFile
type GetFileContentsResponse ¶
type GetFileContentsResponse struct {
Data string `json:"data"`
CommonResponse
}
type GetFileListRequest ¶
type GetFileListRequest struct {
BaseRequest
Target string `url:"target"`
Page int `url:"page"`
PageSize int `url:"page_size"`
FileName string `url:"file_name"`
}
func (*GetFileListRequest) BuildQueryString ¶
func (q *GetFileListRequest) BuildQueryString() string
type GetFileListResponse ¶
type GetImageListRequest ¶
type GetImageListRequest struct {
DaemonID string `url:"daemonId"`
}
GetImageListRequest defines the query parameters for getting a list of images.
func (*GetImageListRequest) BuildQueryString ¶
func (q *GetImageListRequest) BuildQueryString() string
type GetImageListResponse ¶
type GetImageListResponse struct {
Data DockerImageList `json:"data"`
Time int64 `json:"time"`
}
GetImageListResponse defines the response structure for getting a list of images.
type GetInstanceQuery ¶
type GetInstanceQuery struct {
UUID string `json:"uuid" url:"uuid"`
DaemonID string `json:"daemonId" url:"daemonId"`
}
GetInstanceQuery defines the query parameters for retrieving a single instance by UUID.
func (*GetInstanceQuery) BuildQueryString ¶
func (q *GetInstanceQuery) BuildQueryString() string
type GetNetworkListResponse ¶ added in v1.0.2
type GetNetworkListResponse struct {
Data DockerNetworkList `json:"data"`
Time int64 `json:"time"`
}
GetNetworkListResponse defines the response structure for getting a list of networks.
type Instance ¶
type Instance struct {
Running int `json:"running"` // Number of running instances
Total int `json:"total"` // Total configured instances
}
Instance contains Minecraft instance statistics
type InstanceConfig ¶
type InstanceConfig struct {
Nickname string `json:"nickname"`
StartCommand string `json:"startCommand"`
StopCommand string `json:"stopCommand"`
Cwd string `json:"cwd"`
IE string `json:"ie"`
OE string `json:"oe"`
CreateDatetime int64 `json:"createDatetime"`
LastDatetime int64 `json:"lastDatetime"`
Type string `json:"type"`
Tag []string `json:"tag"`
EndTime int64 `json:"endTime"`
FileCode string `json:"fileCode"`
ProcessType string `json:"processType"`
UpdateCommand string `json:"updateCommand"`
ActionCommandList []string `json:"actionCommandList"`
CrLf int `json:"crlf"`
Docker *DockerConfig `json:"docker"`
// Steam RCON configuration
EnableRcon bool `json:"enableRcon"`
RconPassword string `json:"rconPassword"`
RconPort int `json:"rconPort"`
RconIp string `json:"rconIp"`
// Terminal options
TerminalOption struct {
HaveColor bool `json:"haveColor"`
Pty bool `json:"pty"`
} `json:"terminalOption"`
// Event task settings
EventTask struct {
AutoStart bool `json:"autoStart"`
AutoRestart bool `json:"autoRestart"`
Ignore bool `json:"ignore"`
} `json:"eventTask"`
// Ping config
PingConfig struct {
IP string `json:"ip"`
Port int `json:"port"`
Type int `json:"type"`
} `json:"pingConfig"`
}
type InstanceDetail ¶
type InstanceDetail struct {
Config *InstanceConfig `json:"config"`
Info struct {
CurrentPlayers int `json:"currentPlayers"`
FileLock int `json:"fileLock"`
MaxPlayers int `json:"maxPlayers"`
OpenFrpStatus bool `json:"openFrpStatus"`
PlayersChart []string `json:"playersChart"`
Version string `json:"version"`
} `json:"info"`
InstanceUUID string `json:"instanceUuid"`
ProcessInfo struct {
CPU int `json:"cpu"`
Memory int `json:"memory"`
PPID int `json:"ppid"`
PID int `json:"pid"`
CTime int64 `json:"ctime"`
Elapsed int64 `json:"elapsed"`
Timestamp int64 `json:"timestamp"`
} `json:"processInfo"`
Space int `json:"space"`
Started int `json:"started"`
Status InstanceStatus `json:"status"` // Instance status (0: stopped, 1: starting, 2: running, etc.)
}
InstanceDetail represents detailed information about an instance.
type InstanceDetailResponse ¶
type InstanceDetailResponse struct {
Status int `json:"status"`
Data *InstanceDetail `json:"data"`
Time int64 `json:"time"`
}
InstanceDetailResponse represents the response structure for a single instance.
type InstanceListResponse ¶
type InstanceListResponse struct {
Status int `json:"status"`
Data struct {
MaxPage int `json:"maxPage"`
PageSize int `json:"pageSize"`
AllTags []string `json:"allTags"`
Data []*InstanceDetail `json:"data"`
} `json:"data"`
Time int64 `json:"time"`
}
InstanceListResponse represents the response structure for a list of instances.
type InstanceStatus ¶
type InstanceStatus int
const ( InstanceStop InstanceStatus = 0 InstanceStarting InstanceStatus = 1 InstanceRunning InstanceStatus = 2 // InstanceStopping Maybe exists status idk ¯\_(ツ)_/¯ InstanceStopping InstanceStatus = 3 )
type KillInstanceQuery ¶
KillInstanceQuery defines the query parameters for killing an instance.
func (*KillInstanceQuery) BuildQueryString ¶
func (q *KillInstanceQuery) BuildQueryString() string
type KillInstanceResponse ¶
type KillInstanceResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
} `json:"data"`
Time int64 `json:"time"`
}
KillInstanceResponse represents the response for killing an instance.
type ListInstancesQuery ¶
type ListInstancesQuery struct {
DaemonID string `json:"daemonId" url:"daemonId"`
Page int `json:"page" url:"page"`
PageSize int `json:"page_size" url:"page_size"`
InstanceName string `json:"instance_name" url:"instance_name"`
Status InstanceStatus `json:"status" url:"status"`
}
ListInstancesQuery defines the query parameters for listing remote service instances.
func (*ListInstancesQuery) BuildQueryString ¶
func (q *ListInstancesQuery) BuildQueryString() string
type MethodClient ¶
type MethodClient struct {
// contains filtered or unexported fields
}
type MoveFile ¶
type MoveFile struct {
Target *MoveFileRequest
FileData *FileSourceTargetPairs
}
type MoveFileRequest ¶
type MoveFileRequest struct {
BaseRequest
}
func (*MoveFileRequest) BuildQueryString ¶
func (q *MoveFileRequest) BuildQueryString() string
type MoveFileResponse ¶
type MoveFileResponse BoolResponse
type PanelData ¶
type PanelData struct {
Status int `json:"status"` // HTTP status code
Data Data `json:"data"` // Main data payload
Time int64 `json:"time"` // Timestamp of the response
}
PanelData represents the root structure of the MCSManager panel data
type Process ¶
type Process struct {
CPU int `json:"cpu"` // CPU usage percentage
Memory int `json:"memory"` // Memory usage in bytes (Panel Memory Usage)
Cwd string `json:"cwd"` // Current working directory
}
Process contains information about the panel process
type Record ¶
type Record struct {
Logined int `json:"logined"` // Successful logins count
IllegalAccess int `json:"illegalAccess"` // Unauthorized access attempts
Banips int `json:"banips"` // Banned IP addresses count
LoginFailed int `json:"loginFailed"` // Failed login attempts
}
Record tracks authentication and security events
type Remote ¶
type Remote struct {
Version string `json:"version"` // Daemon software version
Process DaemonProcess `json:"process"` // Daemon process info
Instance Instance `json:"instance"` // Managed instances info
System DaemonSystem `json:"system"` // Daemon host system info (CPU and memory usage on the Daemon)
CPUMemChart []CPUMemChart `json:"cpuMemChart"` // Performance metrics (CPU and memory usage on the Daemon Chart)
UUID string `json:"uuid"` // Unique daemon identifier
IP string `json:"ip"` // Connection IP/hostname
Port int `json:"port"` // Connection port
Prefix string `json:"prefix"` // URL prefix
Available bool `json:"available"` // Connection status
Remarks string `json:"remarks"` // Descriptive label
}
Remote represents a connected daemon instance
type RemoteCount ¶
type RemoteCount struct {
Available int `json:"available"` // Number of available daemons
Total int `json:"total"` // Total registered daemons
}
RemoteCount tracks connected daemon statistics
type RequestChart ¶
type RequestChart struct {
Value int `json:"value"` // Current active requests
TotalInstance int `json:"totalInstance"` // Total managed instances
RunningInstance int `json:"runningInstance"` // Currently running instances
}
RequestChart represents application request metrics
type RestartInstanceQuery ¶
RestartInstanceQuery defines the query parameters for restarting an instance.
func (*RestartInstanceQuery) BuildQueryString ¶
func (q *RestartInstanceQuery) BuildQueryString() string
type RestartInstanceResponse ¶
type RestartInstanceResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
} `json:"data"`
Time int64 `json:"time"`
}
RestartInstanceResponse represents the response for restarting an instance.
type StartInstanceQuery ¶
StartInstanceQuery defines the query parameters for starting an instance.
func (*StartInstanceQuery) BuildQueryString ¶
func (q *StartInstanceQuery) BuildQueryString() string
type StartInstanceResponse ¶
type StartInstanceResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
} `json:"data"`
Time int64 `json:"time"`
}
StartInstanceResponse represents the response for starting an instance.
type StopInstanceQuery ¶
StopInstanceQuery defines the query parameters for stopping an instance.
func (*StopInstanceQuery) BuildQueryString ¶
func (q *StopInstanceQuery) BuildQueryString() string
type StopInstanceResponse ¶
type StopInstanceResponse struct {
Status int `json:"status"`
Data struct {
InstanceUUID string `json:"instanceUuid"`
} `json:"data"`
Time int64 `json:"time"`
}
StopInstanceResponse represents the response for stopping an instance.
type System ¶
type System struct {
User User `json:"user"` // System user information
Time int64 `json:"time"` // Timestamp (Memory usage on the panel)
Totalmem int64 `json:"totalmem"` // Total system memory in bytes
Freemem int64 `json:"freemem"` // Free memory in bytes
Type string `json:"type"` // OS type (Windows_NT/Linux)
Version string `json:"version"` // OS version
Node string `json:"node"` // Node.js version
Hostname string `json:"hostname"` // System hostname
Loadavg []int `json:"loadavg"` // System load averages (Linux only)
Platform string `json:"platform"` // Platform identifier
Release string `json:"release"` // Kernel release version
Uptime float64 `json:"uptime"` // System uptime in seconds
CPU float64 `json:"cpu"` // Overall CPU usage percentage
}
System contains detailed host system information
type SystemChart ¶
type SystemChart struct {
CPU float64 `json:"cpu"` // CPU usage percentage
Mem float64 `json:"mem"` // Memory usage percentage
}
SystemChart represents a single data point for system metrics
type TargetedFile ¶
type TargetedFile struct {
Target string `json:"target"`
}
type TouchFile ¶
type TouchFile struct {
Target *TouchFileRequest
FileData *TouchFileRequestBody
}
type TouchFileRequest ¶
type TouchFileRequest struct {
BaseRequest
}
func (*TouchFileRequest) BuildQueryString ¶
func (q *TouchFileRequest) BuildQueryString() string
type TouchFileRequestBody ¶
type TouchFileRequestBody TargetedFile
type TouchFileResponse ¶
type TouchFileResponse BoolResponse
type TryConnectDaemonQuery ¶
type TryConnectDaemonQuery struct {
UUID string `url:"uuid"`
}
func (*TryConnectDaemonQuery) BuildQueryString ¶
func (q *TryConnectDaemonQuery) BuildQueryString() string
type UnzipFileResponse ¶
type UnzipFileResponse BoolResponse
type UpdateConfigQuery ¶
UpdateConfigQuery defines the query parameters for updating an instance config.
func (*UpdateConfigQuery) BuildQueryString ¶
func (q *UpdateConfigQuery) BuildQueryString() string
type UpdateConfigResponse ¶
type UpdateFile ¶
type UpdateFile struct {
Target *UpdateFileRequest
FileData *UpdateFileRequestBody
}
type UpdateFileRequest ¶
type UpdateFileRequest BaseRequest
type UpdateFileRequestBody ¶
type UpdateFileResponse ¶
type UpdateFileResponse BoolResponse
type UpdateUserRequest ¶ added in v1.0.2
UpdateUser updates user data by uuid. PUT /auth
type UploadFileRequest ¶
type UploadFileRequest DownloadFileRequest
func (*UploadFileRequest) BuildQueryString ¶
func (q *UploadFileRequest) BuildQueryString() string
type UploadFileResponse ¶
type UploadFileResponse DownloadFileResponse
type User ¶
type User struct {
UID int `json:"uid"` // User ID
GID int `json:"gid"` // Group ID
Username string `json:"username"` // Username
Homedir string `json:"homedir"` // Home directory path
Shell any `json:"shell"` // Shell path (nullable)
}
User contains system user account information
type UserData ¶
type UserData struct {
UUID string `json:"uuid"`
UserName string `json:"userName"`
PassWord string `json:"passWord"`
PassWordType int `json:"passWordType"`
Salt string `json:"salt"`
Permission int `json:"permission"`
RegisterTime string `json:"registerTime"`
LoginTime string `json:"loginTime"`
Instances []UserInstance `json:"instances"`
ApiKey string `json:"apiKey"`
IsInit bool `json:"isInit"`
Secret string `json:"secret"`
Open2FA bool `json:"open2FA"`
}
UserData represents user information and authentication details.
type UserInstance ¶
type UserListData ¶
type UserListData struct {
Data []UserData `json:"data"`
MaxPage int `json:"maxPage"`
Page int `json:"page"`
PageSize int `json:"pageSize"`
Total int `json:"total"`
}
UserListData represents a paginated list of users returned by the API.
type UserListResponse ¶
type UserListResponse struct {
Status int `json:"status"`
Data UserListData `json:"data"`
Time int64 `json:"time"`
}
type UserQueryParams ¶
type UserQueryParams struct {
UserName *string `url:"userName,omitempty"` // Optional: Filter by username (partial match)
Page int `url:"page"` // Required: Page number (1-based index)
PageSize int `url:"page_size"` // Required: Number of items per page
Role *string `url:"role,omitempty"` // Optional: Filter by permission role ("1", "10", or "-1")
}
UserQueryParams — parameters for searching/filtering users for /auth/search
func (*UserQueryParams) BuildQueryString ¶
func (u *UserQueryParams) BuildQueryString() string
type ZipFileRequest ¶
type ZipFileRequest struct {
BaseRequest
}
func (*ZipFileRequest) BuildQueryString ¶
func (q *ZipFileRequest) BuildQueryString() string
type ZipFileRequestBody ¶
type ZipFileRequestBody struct {
Type CompressMode `json:"type"` // 1 for zip
Code string `json:"code"` // "utf-8"
Source string `json:"source"` // Zip file path
Targets []string `json:"targets"`
}
type ZipFileResponse ¶
type ZipFileResponse BoolResponse