-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0854a5e
commit d58aa32
Showing
6 changed files
with
110 additions
and
15 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
meta { | ||
name: Subscribe to query | ||
type: http | ||
seq: 5 | ||
} | ||
|
||
delete { | ||
url: {{baseUrl}}/queries/UniqueQueryName/subscriptions/c8f1e6d9-252b-4bd5-b0a3-f8f1094cd1a3 | ||
body: json | ||
auth: basic | ||
} | ||
|
||
auth:basic { | ||
username: {{username}} | ||
password: {{password}} | ||
} | ||
|
||
body:json { | ||
{ | ||
"dest": "https://localhost:5001/test", | ||
"reportIfEmpty": false, | ||
"stream": true | ||
} | ||
} | ||
|
||
vars:pre-request { | ||
queryName: UniqueQueryName | ||
} | ||
|
||
assert { | ||
res.status: eq 201 | ||
res.headers.location: isDefined | ||
} | ||
|
||
tests { | ||
test("Should contain the location header", function() { | ||
expect(res.headers.location).to.equals("queries/UniqueQueryName"); | ||
}); | ||
|
||
} | ||
|
||
docs { | ||
# Creates a named EPCIS events query. | ||
|
||
Creating a named query creates a view on the events in the repository, accessible through its events resource. To obtain the named query results, the client can use the URL in the `Location` header. The client can also use this URL to start a query subscription immediately after creating the query. | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
meta { | ||
name: Unsubscribe | ||
type: http | ||
seq: 6 | ||
} | ||
|
||
delete { | ||
url: {{baseUrl}}/queries/UniqueQueryName/subscriptions/c8f1e6d9-252b-4bd5-b0a3-f8f1094cd1a3 | ||
body: json | ||
auth: basic | ||
} | ||
|
||
auth:basic { | ||
username: {{username}} | ||
password: {{password}} | ||
} | ||
|
||
body:json { | ||
{ | ||
"dest": "https://localhost:5001/test", | ||
"reportIfEmpty": false, | ||
"stream": true | ||
} | ||
} | ||
|
||
vars:pre-request { | ||
queryName: UniqueQueryName | ||
} | ||
|
||
assert { | ||
res.status: eq 201 | ||
res.headers.location: isDefined | ||
} | ||
|
||
tests { | ||
test("Should contain the location header", function() { | ||
expect(res.headers.location).to.equals("queries/UniqueQueryName"); | ||
}); | ||
|
||
} | ||
|
||
docs { | ||
# Creates a named EPCIS events query. | ||
|
||
Creating a named query creates a view on the events in the repository, accessible through its events resource. To obtain the named query results, the client can use the URL in the `Location` header. The client can also use this URL to start a query subscription immediately after creating the query. | ||
} |
14 changes: 7 additions & 7 deletions
14
src/FasTnT.Domain/Model/Subscriptions/SubscriptionSchedule.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
namespace FasTnT.Domain.Model.Subscriptions; | ||
|
||
public class SubscriptionSchedule | ||
public sealed record SubscriptionSchedule | ||
{ | ||
public string Second { get; set; } | ||
public string Minute { get; set; } | ||
public string Hour { get; set; } | ||
public string DayOfMonth { get; set; } | ||
public string Month { get; set; } | ||
public string DayOfWeek { get; set; } | ||
public string Second { get; init; } | ||
public string Minute { get; init; } | ||
public string Hour { get; init; } | ||
public string DayOfMonth { get; init; } | ||
public string Month { get; init; } | ||
public string DayOfWeek { get; init; } | ||
} |
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
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
9 changes: 6 additions & 3 deletions
9
src/FasTnT.Host/Subscriptions/Schedulers/TriggeredSubscriptionScheduler.cs
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