91 authenticationContext,
145 if (
model.NewVersion ==
null)
148 AdditionalData =
"newVersion is required!",
167#pragma warning disable API1001
171#pragma warning restore API1001
211 .OrderByDescending(
x =>
x.Name));
218 AdditionalData = ex.ToString(),
273 AdditionalData = ex.ToString(),
Represents a request to update TGS.
Represents administrative server information.
Represents an error message returned by the server.
Represents a server log file.
Represents a paginated set of models.
A response to a Request.ServerUpdateRequest.
Routes to a server actions.
const string Administration
The server administration controller.
const string Logs
The endpoint to download server logs.
File logging configuration options.
string GetFullLogDirectory(IIOManager ioManager, IAssemblyInformationProvider assemblyInformationProvider, IPlatformIdentifier platformIdentifier)
Gets the evaluated log Directory.
ApiController for TGS administration purposes.
readonly IRestAuthorityInvoker< IAdministrationAuthority > administrationAuthority
The IRestAuthorityInvoker<TAuthority> for the IAdministrationAuthority.
ValueTask< IActionResult > Read([FromQuery] bool? fresh, CancellationToken cancellationToken)
Get AdministrationResponse server information.
AdministrationController(IDatabaseContext databaseContext, IAuthenticationContext authenticationContext, IApiHeadersProvider apiHeadersProvider, ILogger< AdministrationController > logger, IRestAuthorityInvoker< IAdministrationAuthority > administrationAuthority, IAssemblyInformationProvider assemblyInformationProvider, IIOManager ioManager, IPlatformIdentifier platformIdentifier, IFileTransferTicketProvider fileTransferService, IOptions< FileLoggingConfiguration > fileLoggingConfigurationOptions)
Initializes a new instance of the AdministrationController class.
ValueTask< IActionResult > ListLogs([FromQuery] int? page, [FromQuery] int? pageSize, CancellationToken cancellationToken)
List LogFileResponses present.
readonly FileLoggingConfiguration fileLoggingConfiguration
The FileLoggingConfiguration for the AdministrationController.
ValueTask< IActionResult > AdministrationResponse(this, authority=> authority.GetUpdateInformation(fresh ?? false, cancellationToken))
readonly IAssemblyInformationProvider assemblyInformationProvider
The IAssemblyInformationProvider for the AdministrationController.
ValueTask< IActionResult > Delete()
Attempts to restart the server.
readonly IFileTransferTicketProvider fileTransferService
The IFileTransferTicketProvider for the AdministrationController.
async ValueTask< IActionResult > Update([FromBody] ServerUpdateRequest model, CancellationToken cancellationToken)
Attempt to perform a server upgrade.
async ValueTask< IActionResult > GetLog(string path, CancellationToken cancellationToken)
Download a LogFileResponse.
readonly IPlatformIdentifier platformIdentifier
The IPlatformIdentifier for the AdministrationController.
readonly IIOManager ioManager
The IIOManager for the AdministrationController.
Base Controller for API functions.
Represents a file on disk to be downloaded.
IAuthority for administrative server operations.
ValueTask< AuthorityResponse > TriggerServerRestart()
Triggers a restart of tgstation-server without terminating running game instances.
ValueTask< AuthorityResponse< ServerUpdateResponse > > TriggerServerVersionChange(Version targetVersion, bool uploadZip, CancellationToken cancellationToken)
Triggers a restart of tgstation-server without terminating running game instances,...
ValueTask< AuthorityResponse< AdministrationResponse > > GetUpdateInformation(bool forceFresh, CancellationToken cancellationToken)
Gets the AdministrationResponse containing server update information.
Invokes TAuthority methods and generates IActionResult responses.
ValueTask< IActionResult > Invoke(ApiController controller, Func< TAuthority, ValueTask< AuthorityResponse > > authorityInvoker)
Invoke a TAuthority method with no success result.
Interface for using filesystems.
Task< IReadOnlyList< string > > GetFiles(string path, CancellationToken cancellationToken)
Returns full file names in a given path .
string GetFileName(string path)
Gets the file name portion of a path .
string ConcatPath(params string[] paths)
Combines an array of strings into a path.
Task< DateTimeOffset > GetLastModified(string path, CancellationToken cancellationToken)
Get the DateTimeOffset of when a given path was last modified.
For creating and accessing authentication contexts.
Service for temporarily storing files to be downloaded or uploaded.
FileTicketResponse CreateDownload(FileDownloadProvider fileDownloadProvider)
Create a FileTicketResponse for a download.
ErrorCode
Types of Response.ErrorMessageResponses that the API may return.
@ List
User may list files if the Models.Instance allows it.
AdministrationRights
Administration rights for the server.