Initial implementation of procfile

Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2024-12-23 14:52:23 +00:00
parent b4b96b3f4e
commit 09dd248d24
33 changed files with 343 additions and 311 deletions

View File

@@ -0,0 +1,7 @@
namespace Pushy.Domain;
public interface ILinkGenerator : IGrainWithGuidKey
{
[Alias("GenerateLink")]
public ValueTask<LinkResult> GenerateTextShare([Immutable] string text);
}

14
Pushy.Domain/ITextItem.cs Normal file
View File

@@ -0,0 +1,14 @@
using Orleans.Concurrency;
namespace Pushy.Domain;
public interface ITextItem : IGrainWithStringKey
{
[Alias("SetText")]
public ValueTask<TextSetResult> SetText(string text);
[ReadOnly]
[return: Immutable]
[Alias("GetText")]
ValueTask<string> GetText();
}

View File

@@ -0,0 +1,6 @@
namespace Pushy.Domain;
[Immutable]
[GenerateSerializer]
[Alias("Pushy.Grains.LinkResult")]
public record LinkResult(ITextItem? Item);

View File

@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Sdk" Version="9.0.1" />
</ItemGroup>
</Project>

6
Pushy.Domain/TextItem.cs Normal file
View File

@@ -0,0 +1,6 @@
namespace Pushy.Domain;
public sealed class TextItem
{
public string? Text { get; set; }
}

View File

@@ -0,0 +1,8 @@
namespace Pushy.Domain;
[GenerateSerializer]
public enum TextSetResult
{
Failure,
Success
}