services

package
v1.0.37 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService struct {
	// contains filtered or unexported fields
}

AuthService implements the Auth service

func NewAuthService

func NewAuthService(store *storage.Store, authManager *auth.Manager, log *logger.Logger) *AuthService

NewAuthService creates a new auth service

func (*AuthService) ChangePassword

ChangePassword changes user's own password

func (*AuthService) GetAuthConfig

GetAuthConfig gets auth configuration

func (*AuthService) GetAuthStatus

GetAuthStatus checks if auth is enabled

func (*AuthService) GetCurrentUser

GetCurrentUser gets authenticated user info

func (*AuthService) Login

Login authenticates user credentials

func (*AuthService) Logout

Logout invalidates session token

func (*AuthService) Register

Register creates a new user account

func (*AuthService) ResetPassword

ResetPassword resets password with recovery key

func (*AuthService) UpdateAuthConfig

UpdateAuthConfig modifies auth configuration

type BundleInfo

type BundleInfo struct {
	ID        string
	Filename  string
	Path      string
	Size      int64
	CreatedAt time.Time
}

BundleInfo stores information about a generated bundle

type ConfigService

type ConfigService struct {
	// contains filtered or unexported fields
}

func NewConfigService

func NewConfigService(store *storage.Store, cfg *config.Config, docker *docker.Client, log *logger.Logger) *ConfigService

Creates new config service

func (*ConfigService) GetGlobalSettings

Gets global settings

func (*ConfigService) GetServerConfig

Gets server config

func (*ConfigService) UpdateGlobalSettings

Updates global settings

func (*ConfigService) UpdateServerConfig

Updates server config

type FileService

type FileService struct {
	// contains filtered or unexported fields
}

FileService implements the File service

func NewFileService

func NewFileService(store *storage.Store, docker *docker.Client, uploadManager *upload.Manager, log *logger.Logger) *FileService

NewFileService creates a new file service

func (*FileService) DeleteFile

DeleteFile deletes a file

func (*FileService) ExtractArchive

ExtractArchive extracts an archive

func (*FileService) GetFile

GetFile gets a file's content

func (*FileService) ListFiles

ListFiles lists files in a directory

func (*FileService) RenameFile

RenameFile renames a file

func (*FileService) SaveUploadedFile added in v1.0.30

SaveUploadedFile saves a file from a completed chunked upload session

func (*FileService) UpdateFile

UpdateFile updates a file's content

type MinecraftService

type MinecraftService struct {
	// contains filtered or unexported fields
}

MinecraftService implements the Minecraft service

func NewMinecraftService

func NewMinecraftService(store *storage.Store, docker *docker.Client, log *logger.Logger) *MinecraftService

NewMinecraftService creates a new minecraft service

func (*MinecraftService) GetDockerImages

GetDockerImages gets available Docker images

func (*MinecraftService) GetMinecraftVersions

GetMinecraftVersions gets available Minecraft versions

func (*MinecraftService) GetModLoaders

GetModLoaders gets available mod loaders

type ModService

type ModService struct {
	// contains filtered or unexported fields
}

ModService implements the Mod service

func NewModService

func NewModService(store *storage.Store, docker *docker.Client, uploadManager *upload.Manager, log *logger.Logger) *ModService

NewModService creates a new mod service

func (*ModService) DeleteMod

DeleteMod deletes a mod

func (*ModService) GetMod

GetMod gets a specific mod

func (*ModService) ImportUploadedMod added in v1.0.30

ImportUploadedMod imports a mod

func (*ModService) ListMods

ListMods lists mods for a server

func (*ModService) UpdateMod

UpdateMod updates a mod

type ModpackService

type ModpackService struct {
	// contains filtered or unexported fields
}

ModpackService implements the Modpack service

func NewModpackService

func NewModpackService(store *storage.Store, cfg *config.Config, uploadManager *upload.Manager, log *logger.Logger) *ModpackService

NewModpackService creates a new modpack service

func (*ModpackService) DeleteModpack

DeleteModpack deletes a modpack

func (*ModpackService) GetIndexerStatus

GetIndexerStatus gets indexer status

func (*ModpackService) GetModpack

GetModpack gets a specific modpack

func (*ModpackService) GetModpackBySlug added in v1.0.25

GetModpackBySlug gets a modpack by its slug

func (*ModpackService) GetModpackByURL added in v1.0.25

GetModpackByURL gets a modpack by its website URL

func (*ModpackService) GetModpackConfig

GetModpackConfig gets modpack configuration

func (*ModpackService) GetModpackFiles

GetModpackFiles gets modpack files

func (*ModpackService) GetModpackVersions

GetModpackVersions gets modpack versions

func (*ModpackService) ImportUploadedModpack added in v1.0.30

ImportUploadedModpack imports a modpack from a completed chunked upload session

func (*ModpackService) ListFavorites

ListFavorites lists favorite modpacks

func (*ModpackService) SearchModpacks

SearchModpacks searches for modpacks

func (*ModpackService) SyncModpackFiles

SyncModpackFiles syncs modpack files

func (*ModpackService) SyncModpacks

SyncModpacks syncs modpacks

func (*ModpackService) ToggleFavorite

ToggleFavorite toggles modpack favorite status

type ModuleService added in v1.0.23

type ModuleService struct {
	// contains filtered or unexported fields
}

ModuleService implements the Module service

func NewModuleService added in v1.0.23

func NewModuleService(
	store *storage.Store,
	docker *docker.Client,
	moduleManager *module.Manager,
	proxyManager *proxy.Manager,
	cfg *config.Config,
	logStreamer *logger.LogStreamer,
	log *logger.Logger,
) *ModuleService

NewModuleService creates a new module service

func (*ModuleService) CreateModule added in v1.0.23

func (*ModuleService) CreateModuleTemplate added in v1.0.23

func (*ModuleService) DeleteModule added in v1.0.23

func (*ModuleService) DeleteModuleTemplate added in v1.0.23

func (*ModuleService) GetAvailableAliases added in v1.0.23

GetAvailableAliases returns all available aliases for module/template configuration

func (*ModuleService) GetModule added in v1.0.23

func (*ModuleService) GetModuleLogs added in v1.0.23

func (*ModuleService) GetModuleTemplate added in v1.0.23

func (*ModuleService) GetNextAvailableModulePort added in v1.0.23

func (*ModuleService) GetResolvedAliases added in v1.0.23

Get all aliases with resolved values for ctx

func (*ModuleService) ListModuleTemplates added in v1.0.23

func (*ModuleService) ListModules added in v1.0.23

func (*ModuleService) RecreateModule added in v1.0.23

func (*ModuleService) RestartModule added in v1.0.23

func (*ModuleService) StartModule added in v1.0.23

func (*ModuleService) StopModule added in v1.0.23

func (*ModuleService) UpdateModule added in v1.0.23

func (*ModuleService) UpdateModuleTemplate added in v1.0.23

type ProxyService

type ProxyService struct {
	// contains filtered or unexported fields
}

ProxyService implements the Proxy service

func NewProxyService

func NewProxyService(store *storage.Store, dockerClient *docker.Client, proxyManager *proxy.Manager, cfg *config.Config, logStreamer *logger.LogStreamer, log *logger.Logger) *ProxyService

NewProxyService creates a new proxy service

func (*ProxyService) CreateProxyListener

CreateProxyListener creates a proxy listener

func (*ProxyService) DeleteProxyListener

DeleteProxyListener deletes a proxy listener

func (*ProxyService) GetProxyListeners

GetProxyListeners gets proxy listeners

func (*ProxyService) GetProxyRoutes

GetProxyRoutes gets proxy routes

func (*ProxyService) GetProxyStatus

GetProxyStatus gets proxy status

func (*ProxyService) GetServerRouting

GetServerRouting gets server routing configuration

func (*ProxyService) UpdateProxyConfig

UpdateProxyConfig updates proxy configuration

func (*ProxyService) UpdateProxyListener

UpdateProxyListener updates a proxy listener

func (*ProxyService) UpdateServerRouting

UpdateServerRouting updates server routing configuration

type ServerService

type ServerService struct {
	// contains filtered or unexported fields
}

ServerService implements the Server service

func NewServerService

func NewServerService(store *storage.Store, docker *docker.Client, config *config.Config, proxy *proxy.Manager, logStreamer *logger.LogStreamer, metricsCollector *metrics.Collector, moduleManager *module.Manager, log *logger.Logger) *ServerService

NewServerService creates a new server service

func (*ServerService) ClearServerLogs

ClearServerLogs clears server logs

func (*ServerService) CreateServer

CreateServer creates a new server

func (*ServerService) DeleteServer

DeleteServer deletes a server

func (*ServerService) GetNextAvailablePort

GetNextAvailablePort gets the next available port

func (*ServerService) GetServer

GetServer gets a specific server

func (*ServerService) GetServerLogs

GetServerLogs gets server logs

func (*ServerService) ListServers

ListServers lists all servers

func (*ServerService) RecreateServer added in v1.0.21

Destroys and recreates a server container from scratch - brute force reset

func (*ServerService) RestartServer

RestartServer restarts a server

func (*ServerService) SendCommand

SendCommand sends a command to a server

func (*ServerService) StartServer

StartServer starts a server

func (*ServerService) StopServer

StopServer stops a server

func (*ServerService) UpdateServer

UpdateServer updates a server

type SupportService

type SupportService struct {
	// contains filtered or unexported fields
}

SupportService implements the Support service

func NewSupportService

func NewSupportService(store *storage.Store, docker *docker.Client, config *config.Config, log *logger.Logger) *SupportService

NewSupportService creates a new support service

func (*SupportService) DownloadSupportBundle

DownloadSupportBundle downloads a support bundle

func (*SupportService) GenerateSupportBundle

GenerateSupportBundle generates a support bundle

func (*SupportService) GetApplicationLogs added in v1.0.22

GetApplicationLogs returns the application log file content

func (*SupportService) UploadSupportBundle

UploadSupportBundle generates and uploads a support bundle to the support server

type TaskService added in v1.0.20

type TaskService struct {
	// contains filtered or unexported fields
}

TaskService implements the Task service

func NewTaskService added in v1.0.20

func NewTaskService(store *storage.Store, sched *scheduler.Scheduler, log *logger.Logger) *TaskService

NewTaskService creates a new task service

func (*TaskService) CancelExecution added in v1.0.20

CancelExecution cancels a running execution

func (*TaskService) CreateTask added in v1.0.20

CreateTask creates a new scheduled task

func (*TaskService) DeleteTask added in v1.0.20

DeleteTask deletes a task

func (*TaskService) GetSchedulerStatus added in v1.0.20

GetSchedulerStatus gets the scheduler status

func (*TaskService) GetTask added in v1.0.20

GetTask gets a specific task

func (*TaskService) GetTaskExecution added in v1.0.20

GetTaskExecution gets a specific execution

func (*TaskService) ListServerExecutions added in v1.0.20

ListServerExecutions gets execution history for a server

func (*TaskService) ListTaskExecutions added in v1.0.20

ListTaskExecutions gets execution history for a task

func (*TaskService) ListTasks added in v1.0.20

ListTasks lists all tasks for a server

func (*TaskService) ToggleTask added in v1.0.20

ToggleTask toggles task enabled/disabled status

func (*TaskService) TriggerTask added in v1.0.20

TriggerTask manually triggers a task execution

func (*TaskService) UpdateTask added in v1.0.20

UpdateTask updates an existing task

type UploadService added in v1.0.30

type UploadService struct {
	// contains filtered or unexported fields
}

UploadService implements the Upload service

func NewUploadService added in v1.0.30

func NewUploadService(manager *upload.Manager, cfg *config.Config, log *logger.Logger) *UploadService

NewUploadService creates a new upload service

func (*UploadService) CancelUpload added in v1.0.30

CancelUpload cancels an upload session and cleans up

func (*UploadService) GetManager added in v1.0.30

func (s *UploadService) GetManager() *upload.Manager

GetManager returns the upload manager (for use by other services)

func (*UploadService) GetUploadStatus added in v1.0.30

GetUploadStatus returns the status of an upload session

func (*UploadService) InitUpload added in v1.0.30

InitUpload creates a new upload session

func (*UploadService) UploadChunk added in v1.0.30

UploadChunk uploads a single chunk

type UploadUserInfo added in v1.0.29

type UploadUserInfo struct {
	DiscordUsername  string
	Email            string
	GithubUsername   string
	IssueDescription string
	StepsToReproduce string
}

UploadUserInfo contains user-provided contact and issue information

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

UserService implements the User service

func NewUserService

func NewUserService(store *storage.Store, authManager *auth.Manager, log *logger.Logger) *UserService

NewUserService creates a new user service

func (*UserService) CreateUser

CreateUser creates a new user (admin only)

func (*UserService) DeleteUser

DeleteUser deletes a user (admin only)

func (*UserService) ListUsers

ListUsers lists all users (admin only)

func (*UserService) UpdateUser

UpdateUser updates a user (admin only)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL