11using Microsoft . OneFuzz . Service . OneFuzzLib . Orm ;
22using System ;
3+ using System . Collections . Generic ;
34using PoolName = System . String ;
45
56namespace Microsoft . OneFuzz . Service ;
@@ -14,6 +15,12 @@ namespace Microsoft.OneFuzz.Service;
1415/// the "partion key" and "row key" are identified by the [PartitionKey] and [RowKey] attributes
1516/// Guids are mapped to string in the db
1617
18+ public record Authentication
19+ (
20+ string Password ,
21+ string PublicKey ,
22+ string PrivateKey
23+ ) ;
1724
1825[ SkipRename ]
1926public enum HeartbeatType
@@ -70,6 +77,13 @@ public enum NodeState
7077 Halt ,
7178}
7279
80+ public record ProxyHeartbeat
81+ (
82+ string Region ,
83+ Guid ProxyId ,
84+ List < ProxyForward > Forwards ,
85+ DateTimeOffset TimeStamp
86+ ) ;
7387
7488public partial record Node
7589(
@@ -87,6 +101,39 @@ bool DebugKeepNode
87101) : EntityBase ( ) ;
88102
89103
104+ public partial record ProxyForward
105+ (
106+ [ PartitionKey ] string Region ,
107+ [ RowKey ] int DstPort ,
108+ int SrcPort ,
109+ string DstIp
110+ ) : EntityBase ( ) ;
111+
112+ public partial record ProxyConfig
113+ (
114+ Uri Url ,
115+ string Notification ,
116+ string Region ,
117+ Guid ? ProxyId ,
118+ List < ProxyForward > Forwards ,
119+ string InstanceTelemetryKey ,
120+ string MicrosoftTelemetryKey
121+
122+ ) ;
123+
124+ public partial record Proxy
125+ (
126+ [ PartitionKey ] string Region ,
127+ [ RowKey ] Guid ProxyId ,
128+ DateTimeOffset ? CreatedTimestamp ,
129+ VmState State ,
130+ Authentication Auth ,
131+ string ? Ip ,
132+ Error ? Error ,
133+ string Version ,
134+ ProxyHeartbeat ? heartbeat
135+ ) : EntityBase ( ) ;
136+
90137public record Error ( ErrorCode Code , string [ ] ? Errors = null ) ;
91138
92139public record UserInfo ( Guid ? ApplicationId , Guid ? ObjectId , String ? Upn ) ;
0 commit comments