first commit

This commit is contained in:
2025-02-26 23:42:19 +01:00
commit 777ea98be1
283 changed files with 88266 additions and 0 deletions
@@ -0,0 +1,39 @@
using System.Text.Json;
using System.Text.Json.Serialization;
using Kafka.Lib.Auth.Model;
namespace Kafka.Lib.Auth;
public class RegisterNewServiceMessageType : IMessageType
{
public string? ServiceName { get; set; }
public string? ServiceAccountUserName { get; set; }
public List<string>? ServicePrivilage { get; set; }
public string? Id { get; set; }
public string? EventType { get; } = "RegisterNewService";
[JsonIgnore]
public string Text
{
get
{
return JsonSerializer.Serialize(this);
}
set
{
if (!string.IsNullOrWhiteSpace(value))
{
var obj = JsonSerializer.Deserialize<RegisterNewServiceMessageType>(value);
if (obj != null)
{
ServiceName = obj.ServiceName;
ServiceAccountUserName = obj.ServiceAccountUserName;
ServicePrivilage = obj.ServicePrivilage;
}
}
}
}
}