This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: kube-green.com/v1alpha1 | |
kind: SleepInfo | |
metadata: | |
name: working-hours | |
spec: | |
weekdays: "1-5" | |
sleepAt: "20:00" | |
wakeUpAt: "08:00" | |
timeZone: "Europe/Rome" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://github.com/Azure/data-api-builder/releases/latest/download/dab.draft.schema.json", | |
"data-source": { | |
"database-type": "mssql", | |
"options": { | |
"set-session-context": false | |
}, | |
"connection-string": "@env('DATABASE_CONNECTION_STRING')" | |
}, | |
"runtime": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app_location: "/src" | |
api_location: "api" | |
output_location: "/dist" | |
data_api_location: "db-config" # Folder holding the staticwebapp.database.config.json file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<PropertyGroup> | |
<NoWarn>$(NoWarn);AD0001</NoWarn> | |
</PropertyGroup> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services.AddOpenTelemetry() | |
.ConfigureResource(resource => resource.AddService("Example-Services")) | |
.WithTracing(tracing => tracing | |
.AddAspNetCoreInstrumentation() | |
.AddHttpClientInstrumentation() | |
.AddSqlClientInstrumentation(options=> options.SetDbStatementForText=true) | |
.AddHotChocolateInstrumentation() | |
.AddAzureMonitorTraceExporter(options => { | |
options.ConnectionString = Configuration.GetSection("ApplicationInsights").GetValue<string>("ConnectionString"); | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services.AddOpenTelemetryTracing(builder => | |
{ | |
builder.AddHttpClientInstrumentation(); | |
builder.AddAspNetCoreInstrumentation(); | |
builder.AddSqlClientInstrumentation(options => { | |
options.SetDbStatementForText = true; | |
}); | |
builder.AddHotChocolateInstrumentation(); | |
builder.SetResourceBuilder(api); | |
builder.AddAzureMonitorTraceExporter(options => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project Sdk="Microsoft.NET.Sdk.Web"> | |
<PropertyGroup> | |
<TargetFramework>net8.0</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Azure.Monitor.OpenTelemetry.Exporter" Version="1.2.0" /> | |
<PackageReference Include="GraphQL.Server.Ui.Playground" Version="5.2.0" /> | |
<PackageReference Include="GraphQL.Server.Ui.Voyager" Version="5.2.0" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export interface CommandProcessor { | |
handle<CommandType extends Command>( | |
commandHandler: CommandHandler<CommandType>, | |
...commandTypes: CommandTypeOf<CommandType>[] | |
): void; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type CommandTypeOf<T extends Command> = T['type']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Handle(ICommand command) => command switch { | |
CreateUserCommand createCommand=> CreateUser(createCommand.Name,createCommand.Email); break, | |
DeleteUserCommand deleteCommand => DeleteUser(deleteCommand.UserId), | |
_ => throw new InvalidOperationException("Unknown command type") | |
}; | |
NewerOlder