62 authenticationContext,
109 .Where(
x =>
x.Id ==
id)
156 return Accepted(
job.ToApi());
179#pragma warning disable CA1506
184 if (
model.ApiValidationPort == 0)
196 if (
model.ProjectName !=
null)
201 if (
model.ProjectName.Length == 0)
207 if (
model.ApiValidationPort.HasValue)
212 if (
model.ApiValidationPort.Value !=
hostModel.ApiValidationPort!.Value)
215 "Triggering port allocator for DM-I:{instanceId} because model port {modelPort} doesn't match DB port {dbPort}...",
217 model.ApiValidationPort,
221 model.ApiValidationPort.Value,
231 if (
model.ApiValidationSecurityLevel.HasValue)
239#pragma warning disable CS0618
241#pragma warning restore CS0618
252 if (
model.DMApiValidationMode.HasValue)
263 if (
model.Timeout.HasValue)
271 if (
model.CompilerAdditionalArguments !=
null)
290#pragma warning restore CA1506
299 .Include(
x =>
x.Job!)
300 .ThenInclude(
x =>
x.StartedBy)
301 .Include(
x =>
x.Job!)
302 .ThenInclude(
x =>
x.Instance)
303 .Include(
x =>
x.RevisionInformation!)
304 .ThenInclude(
x =>
x.PrimaryTestMerge!)
305 .ThenInclude(
x =>
x.MergedBy)
306 .Include(
x =>
x.RevisionInformation)
307 .ThenInclude(
x =>
x.ActiveTestMerges!)
309 .ThenInclude(
x =>
x!.MergedBy)
virtual ? long Id
The ID of the entity.
Metadata about a server instance.
DreamMakerRights? DreamMakerRights
The Rights.DreamMakerRights of the InstancePermissionSet.
A request to the DreamMaker controller.
A request to the DreamMaker controller.
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 DreamMaker
The deployment controller.
new NotFoundObjectResult NotFound()
Generic 404 response.
ILogger< ApiController > Logger
The ILogger for the ApiController.
readonly IInstanceManager instanceManager
The IInstanceManager for the ComponentInterfacingController.
ApiController for managing the deployment system.
async ValueTask< IActionResult > GetId(long id, CancellationToken cancellationToken)
Get a CompileJob specified by a given id .
readonly IPortAllocator portAllocator
The IPortAllocator for the DreamMakerController.
async ValueTask< IActionResult > Read(CancellationToken cancellationToken)
Read current deployment settings.
async ValueTask< IActionResult > Update([FromBody] DreamMakerRequest model, CancellationToken cancellationToken)
Update deployment settings.
IQueryable< CompileJob > BaseCompileJobsQuery()
Base query for pulling in all required CompileJob fields.
ValueTask< IActionResult > List([FromQuery] int? page, [FromQuery] int? pageSize, CancellationToken cancellationToken)
List all CompileJob EntityIds for the instance.
async ValueTask< IActionResult > Create(CancellationToken cancellationToken)
Begin deploying repository code.
readonly IJobManager jobManager
The IJobManager for the DreamMakerController.
DreamMakerController(IDatabaseContext databaseContext, IAuthenticationContext authenticationContext, ILogger< DreamMakerController > logger, IInstanceManager instanceManager, IJobManager jobManager, IPortAllocator portAllocator, IApiHeadersProvider apiHeaders)
Initializes a new instance of the DreamMakerController class.
ComponentInterfacingController for operations that require an instance.
Helper for returning paginated models.
Backend abstract implementation of IDatabaseContext.
DbSet< DreamMakerSettings > DreamMakerSettings
The Models.DreamMakerSettings in the DatabaseContext.
DbSet< CompileJob > CompileJobs
The CompileJobs in the DatabaseContext.
Task Save(CancellationToken cancellationToken)
Saves changes made to the IDatabaseContext.A Task representing the running operation.
static Job Create(JobCode code, User? startedBy, Api.Models.Instance instance)
Creates a new job for registering in the Jobs.IJobService.
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.
Gets unassigned ports for use by TGS.
ValueTask< ushort?> GetAvailablePort(ushort basePort, bool checkOne, CancellationToken cancellationToken)
Gets a port not currently in use by TGS.
ErrorCode
Types of Response.ErrorMessageResponses that the API may return.
JobCode
The different types of Response.JobResponse.
DMApiValidationMode
The DMAPI validation setting for deployments.
@ Read
User can read all chat bot properties except Models.Internal.ChatBotSettings.ConnectionString.
@ List
User may list files if the Models.Instance allows it.
DreamMakerRights
Rights for deployment.
@ DreamMaker
DreamMakerRights.