29 lines
1.0 KiB
C#
29 lines
1.0 KiB
C#
|
|
using Microsoft.AspNetCore.Builder;
|
||
|
|
using Microsoft.AspNetCore.Http;
|
||
|
|
using Microsoft.AspNetCore.Routing;
|
||
|
|
using Microsoft.Extensions.Configuration;
|
||
|
|
using Microsoft.Extensions.DependencyInjection;
|
||
|
|
using TeamUp.SharedKernel.Modularity;
|
||
|
|
|
||
|
|
namespace TeamUp.Modules.Integrations;
|
||
|
|
|
||
|
|
/// <summary>BYOK API configs, the Git connection, the encrypted-credential store (M3).</summary>
|
||
|
|
public sealed class IntegrationsModule : IModule
|
||
|
|
{
|
||
|
|
public string Name => "integrations";
|
||
|
|
|
||
|
|
public void Register(IServiceCollection services, IConfiguration configuration)
|
||
|
|
{
|
||
|
|
// Skeleton: no services yet. M3 introduces this module's (internal) DbContext, the
|
||
|
|
// encrypted ApiConfig store, and the provider-agnostic model-client seam interface.
|
||
|
|
// The concrete model client (Microsoft.Extensions.AI) is deferred to M3-M4.
|
||
|
|
}
|
||
|
|
|
||
|
|
public void MapEndpoints(IEndpointRouteBuilder endpoints)
|
||
|
|
{
|
||
|
|
endpoints.MapGroup($"/api/{Name}")
|
||
|
|
.WithTags("Integrations")
|
||
|
|
.MapGet("/ping", () => TypedResults.Ok(new ModulePing(Name)));
|
||
|
|
}
|
||
|
|
}
|