-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/octopusv2 #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/octopusv2 #20
Changes from all commits
c3ab328
9c6613c
c99d401
8343d16
e69a9de
0dff83b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,3 +2,4 @@ | |
| .vscode | ||
| .gradle | ||
| build | ||
| /plugin/run | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,67 +1,105 @@ | ||||||||||||||||||
| package studio.o7.octopus.plugin.api; | ||||||||||||||||||
|
|
||||||||||||||||||
| import org.jspecify.annotations.NullMarked; | ||||||||||||||||||
| import gentle.Error; | ||||||||||||||||||
| import gentle.Result; | ||||||||||||||||||
| import studio.o7.octopus.plugin.Unsafe; | ||||||||||||||||||
| import studio.o7.octopus.plugin.api.listener.Listener; | ||||||||||||||||||
| import studio.o7.octopus.sdk.gen.api.v1.Entry; | ||||||||||||||||||
| import studio.o7.octopus.sdk.gen.api.v1.Object; | ||||||||||||||||||
| import studio.o7.octopus.sdk.v1.Entry; | ||||||||||||||||||
| import studio.o7.octopus.sdk.v1.QueryResponse; | ||||||||||||||||||
|
|
||||||||||||||||||
| import javax.annotation.Nullable; | ||||||||||||||||||
| import java.time.Instant; | ||||||||||||||||||
| import java.util.Collection; | ||||||||||||||||||
| import java.util.UUID; | ||||||||||||||||||
|
|
||||||||||||||||||
| @NullMarked | ||||||||||||||||||
| public interface Octopus { | ||||||||||||||||||
|
|
||||||||||||||||||
| static Octopus get() { | ||||||||||||||||||
| static Octopus instance() { | ||||||||||||||||||
| return Unsafe.getInstance().get(); | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| /** | ||||||||||||||||||
| * Retrieves existing entries from the database matching a | ||||||||||||||||||
| * key pattern. | ||||||||||||||||||
| * Gets a unique entry of the given key | ||||||||||||||||||
| * | ||||||||||||||||||
| * @param key exact key pattern that will match between entries until one is found | ||||||||||||||||||
| * @return Returns the first {@link studio.o7.octopus.sdk.v1.Entry} that matches the key | ||||||||||||||||||
|
||||||||||||||||||
| * @return Returns the first {@link studio.o7.octopus.sdk.v1.Entry} that matches the key | |
| * @return Returns the first {@link studio.o7.octopus.sdk.v1.Object} that matches the key |
Copilot
AI
Jan 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling: “shure” → “sure”.
| * shure you're not handling a topic twice! | |
| * sure you're not handling a topic twice! |
Copilot
AI
Jan 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs say key patterns use * and <, but the matching implementation and other docs use > as the multi-token wildcard. Update this to > (or the correct symbol) to avoid misleading API consumers.
| * EventCalls, using symbols such as `*` and `<` will subscribe on multiple keys | |
| * There's no safeguard to prevent subscribing to the same topic. So please make | |
| * shure you're not handling a topic twice! | |
| * EventCalls, using symbols such as `*` and `>` will subscribe on multiple keys | |
| * There's no safeguard to prevent subscribing to the same topic. So please make | |
| * sure you're not handling a topic twice! |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||
| package studio.o7.octopus.plugin.api; | ||||||
|
|
||||||
| import gentle.Error; | ||||||
| import lombok.NonNull; | ||||||
|
|
||||||
| public enum OctopusError implements Error { | ||||||
|
|
||||||
| GET_REQUEST_FAILED(0, "While trying to get an entry, a gRPC-Error occurred"), | ||||||
| QUERY_REQUEST_FAILED(1, "While trying to query an entry, a gRPC-Error occurred"), | ||||||
| CALL_REQUEST_FAILED(1, "While trying to call an object, a gRPC-Error occurred"), | ||||||
|
||||||
| CALL_REQUEST_FAILED(1, "While trying to call an object, a gRPC-Error occurred"), | |
| CALL_REQUEST_FAILED(2, "While trying to call an object, a gRPC-Error occurred"), |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package studio.o7.octopus.plugin.api; | ||
| import lombok.Builder; | ||
| import lombok.Getter; | ||
|
|
||
| @Getter | ||
| @Builder | ||
| public class QueryParameter { | ||
|
|
||
| private String keyPattern; | ||
| private String dataFilter; | ||
|
|
||
| private boolean includeExpired; | ||
|
|
||
| private int page; | ||
| private int pageSize; | ||
|
|
||
| private com.google.protobuf.Timestamp createdAtStart; | ||
| private com.google.protobuf.Timestamp createdAtEnd; | ||
|
Comment on lines
+1
to
+18
|
||
|
|
||
| } | ||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The config snippet uses the phrase “Replace to Octopus-API token”, which is ambiguous/grammatically incorrect. Consider rewording (e.g., “Set this to your Octopus API token”) for clearer setup instructions.