81 authenticationContext,
121 Logger.LogWarning(
e,
"Not found exception while retrieving upstream repository info!");
127 TrackedRepositoryUrl =
repoUrl,
150 catch (ApiException
e)
156 AdditionalData = e.Message,
205 catch (ApiException
e)
211 AdditionalData = e.Message,
233 Logger.LogDebug(
"Restart request failed due to lack of host watchdog!");
AdministrationRights? AdministrationRights
The Rights.AdministrationRights for the user.
Represents administrative server information.
Represents an error message returned by the server.
A response to a Request.ServerUpdateRequest.
async ValueTask< AuthorityResponse< ServerUpdateResponse > > TriggerServerVersionChange(Version targetVersion, bool uploadZip, CancellationToken cancellationToken)
Triggers a restart of tgstation-server without terminating running game instances,...
AdministrationAuthority(IAuthenticationContext authenticationContext, IDatabaseContext databaseContext, ILogger< UserAuthority > logger, IGitHubServiceFactory gitHubServiceFactory, IServerControl serverControl, IServerUpdateInitiator serverUpdateInitiator, IFileTransferTicketProvider fileTransferService, IMemoryCache cacheService)
Initializes a new instance of the AdministrationAuthority class.
readonly IFileTransferTicketProvider fileTransferService
The IFileTransferTicketProvider for the AdministrationAuthority.
readonly IServerControl serverControl
The IServerControl for the AdministrationAuthority.
readonly IMemoryCache cacheService
The IMemoryCache for the AdministrationAuthority.
async ValueTask< AuthorityResponse > TriggerServerRestart()
Triggers a restart of tgstation-server without terminating running game instances....
const string OctokitException
Default Exception.Message for ApiExceptions.
async ValueTask< AuthorityResponse< AdministrationResponse > > GetUpdateInformation(bool forceFresh, CancellationToken cancellationToken)
Gets the AdministrationResponse containing server update information.A ValueTask<TResult> resulting i...
readonly IServerUpdateInitiator serverUpdateInitiator
The IServerUpdateInitiator for the AdministrationAuthority.
static readonly object ReadCacheKey
The IMemoryCache key for GetUpdateInformation(bool, CancellationToken).
readonly IGitHubServiceFactory gitHubServiceFactory
The IGitHubServiceFactory for the AdministrationAuthority.
Base implementation of IAuthority.
ILogger< AuthorityBase > Logger
Gets the ILogger for the AuthorityBase.
Represents a response from an authority.
PermissionSet PermissionSet
The User's effective PermissionSet.
IAuthority for administrative server operations.
Represents a service that may take an updated Host assembly and run it, stopping the current assembly...
bool WatchdogPresent
true if live updates are supported, false. TryStartUpdate(IServerUpdateExecutor, Version) and Restart...
ValueTask Restart()
Restarts the Host.
Initiates server self updates.
ValueTask< ServerUpdateResult > InitiateUpdate(IFileStreamProvider? fileStreamProvider, Version version, CancellationToken cancellationToken)
Start the process of downloading and applying an update to a new server version .
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.
Factory for IGitHubServices.
ValueTask< IGitHubService > CreateService(CancellationToken cancellationToken)
Create a IGitHubService.
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.
HttpFailureResponse
Indicates the type of HTTP status code an failing AuthorityResponse should generate.
HttpSuccessResponse
Indicates the type of HTTP status code a successful AuthorityResponse<TResult> should generate.
ServerUpdateResult
The result of a call to start a server update.
FileUploadStreamKind
Determines the type of global::System.IO.Stream returned from IFileUploadTicket's created from IFileT...