71 authenticationContext,
123 .OrderBy(
x =>
x.EngineVersion!.ToString()))),
141 |
EngineRights.InstallOfficialOrChangeActiveOpenDreamVersion
145#pragma warning disable CA1502
146#pragma warning disable CA1506
148#pragma warning restore CA1506
149#pragma warning restore CA1502
162 :
EngineRights.InstallOfficialOrChangeActiveOpenDreamVersion;
180 "User ID {userId} changing instance ID {instanceId} engine to {newByondVersion}",
194 "Race condition: Engine {version} uninstalled before we could switch to it. Creating install job instead...",
202 if (
model.EngineVersion.CustomIteration.HasValue)
206 "User ID {userId} installing engine version {newByondVersion} on instance ID {instanceId}",
212 var job = Models.Job.Create(
215 :
JobCode.EngineOfficialInstall,
363 if (
version.Version.Build != -1)
Information about an engine installation.
virtual ? long Id
The ID of the entity.
Metadata about a server instance.
Represents a PermissionSets permissions in an Instance.
EngineRights? EngineRights
The Rights.EngineRights of the InstancePermissionSet.
Sanity limits to prevent users from overloading.
const int MaximumCommitShaLength
Length limit for git commit SHAs.
A request to delete a specific EngineVersion.
A request to switch to a given EngineVersion.
Represents an engine installation job. FileTicketResponse.FileTicket is used to upload custom version...
Represents an installed Models.EngineVersion.
Represents an error message returned by the server.
Represents a long running job on the server. Model is read-only, updates attempt to cancel the job.
Represents a paginated set of models.
Routes to a server actions.
const string List
The postfix for list operations.
const string Engine
The engine controller.
ILogger< ApiController > Logger
The ILogger for the ApiController.
async ValueTask< IActionResult?> WithComponentInstanceNullable(Func< IInstanceCore, ValueTask< IActionResult?> > action, Models.Instance? instance=null)
Run a given action with the relevant IInstance.
readonly IInstanceManager instanceManager
The IInstanceManager for the ComponentInterfacingController.
async ValueTask< IActionResult > WithComponentInstance(Func< IInstanceCore, ValueTask< IActionResult > > action, Models.Instance? instance=null)
Run a given action with the relevant IInstance.
Controller for managing engine installations.
ValueTask< IActionResult > Read()
Gets the active EngineVersion.
readonly IFileTransferTicketProvider fileTransferService
The IFileTransferTicketProvider for the EngineController.
ValueTask< IActionResult > List([FromQuery] int? page, [FromQuery] int? pageSize, CancellationToken cancellationToken)
Lists installed EngineVersions.
EngineController(IDatabaseContext databaseContext, IAuthenticationContext authenticationContext, ILogger< EngineController > logger, IInstanceManager instanceManager, IJobManager jobManager, IFileTransferTicketProvider fileTransferService, IApiHeadersProvider apiHeadersProvider)
Initializes a new instance of the EngineController class.
static Version NormalizeByondVersion(Version version)
Remove the Version.Build from a given version if present.
async ValueTask< IActionResult > Delete([FromBody] EngineVersionDeleteRequest model, CancellationToken cancellationToken)
Attempts to delete the BYOND version specified in a given model from the instance.
BadRequestObjectResult? ValidateEngineVersion(EngineVersion? version)
Validate and normalize a given version .
async ValueTask< IActionResult > Update([FromBody] EngineVersionRequest model, CancellationToken cancellationToken)
Changes the active engine version to the one specified in a given model .
readonly IJobManager jobManager
The IJobManager for the EngineController.
ComponentInterfacingController for operations that require an instance.
new Models.Instance Instance
The ApiController.Instance.
Helper for returning paginated models.
Operation exceptions thrown from the context of a Models.Job.
Progress reporter for a Job.
User User
The authenticated user.
Manages the runtime of Jobs.
ValueTask RegisterOperation(Job job, JobEntrypoint operation, CancellationToken cancellationToken)
Registers a given Job and begins running it.
For creating and accessing authentication contexts.
Service for temporarily storing files to be downloaded or uploaded.
IFileUploadTicket CreateUpload(FileUploadStreamKind streamKind)
Create a IFileUploadTicket.
A FileTicketResponse that waits for a pending upload.
ErrorCode
Types of Response.ErrorMessageResponses that the API may return.
JobCode
The different types of Response.JobResponse.
EngineType
The type of engine the codebase is using.
@ List
User may list files if the Models.Instance allows it.
EngineRights
Rights for engine version management.
FileUploadStreamKind
Determines the type of global::System.IO.Stream returned from IFileUploadTicket's created from IFileT...