Skip to content

Commit 4f32bb5

Browse files
authored
Reorganized /sys/* endpoints (#25)
1 parent 2e8cf71 commit 4f32bb5

33 files changed

+1043
-833
lines changed

.github/workflows/gradle.yml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,7 @@ jobs:
1717
java:
1818
- 11
1919
vault:
20-
- 1.1.3
21-
- 1.9.0
22-
- 1.9.1
23-
- 1.9.2
24-
- 1.9.3
25-
- 1.9.4
26-
- 1.9.5
27-
- 1.9.6
28-
- 1.9.7
29-
- 1.9.8
30-
- 1.9.9
31-
- 1.9.10
32-
- 1.10.0
33-
- 1.10.1
34-
- 1.10.2
35-
- 1.10.3
36-
- 1.10.4
37-
- 1.10.5
38-
- 1.10.6
39-
- 1.10.7
40-
- 1.10.8
41-
- 1.10.9
42-
- 1.10.10
20+
- 1.10.11
4321
- 1.11.0
4422
- 1.11.1
4523
- 1.11.2
@@ -48,10 +26,13 @@ jobs:
4826
- 1.11.5
4927
- 1.11.6
5028
- 1.11.7
29+
- 1.11.8
5130
- 1.12.0
5231
- 1.12.1
5332
- 1.12.2
5433
- 1.12.3
34+
- 1.12.4
35+
- 1.13.0
5536
- latest
5637
os:
5738
- ubuntu-latest
@@ -64,9 +45,10 @@ jobs:
6445
steps:
6546
- uses: actions/checkout@v1
6647
- name: Set up JDK ${{ matrix.java }}
67-
uses: actions/setup-java@v1
48+
uses: actions/setup-java@v2
6849
with:
6950
java-version: ${{ matrix.java }}
51+
distribution: temurin
7052
- name: Build with Gradle
7153
uses: gradle/gradle-build-action@v2
7254
with:

src/main/java/io/github/jopenlibs/vault/Vault.java

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
import io.github.jopenlibs.vault.api.Auth;
44
import io.github.jopenlibs.vault.api.Debug;
5-
import io.github.jopenlibs.vault.api.Leases;
65
import io.github.jopenlibs.vault.api.Logical;
7-
import io.github.jopenlibs.vault.api.Seal;
86
import io.github.jopenlibs.vault.api.database.Database;
9-
import io.github.jopenlibs.vault.api.mounts.Mounts;
107
import io.github.jopenlibs.vault.api.pki.Pki;
8+
import io.github.jopenlibs.vault.api.sys.Leases;
9+
import io.github.jopenlibs.vault.api.sys.Seal;
10+
import io.github.jopenlibs.vault.api.sys.Sys;
11+
import io.github.jopenlibs.vault.api.sys.mounts.Mounts;
1112
import io.github.jopenlibs.vault.json.Json;
1213
import io.github.jopenlibs.vault.json.JsonObject;
1314
import io.github.jopenlibs.vault.json.JsonValue;
@@ -182,6 +183,16 @@ public Auth auth() {
182183
return new Auth(vaultConfig);
183184
}
184185

186+
/**
187+
* Returns the implementing class for operations on Vault's <code>/v1/sys/*</code> REST
188+
* endpoints
189+
*
190+
* @return The implementing class for Vault's auth operations.
191+
*/
192+
public Sys sys() {
193+
return new Sys(vaultConfig);
194+
}
195+
185196
/**
186197
* Returns the implementing class for Vault's PKI secret backend (i.e. <code>/v1/pki/*</code>
187198
* REST endpoints).
@@ -227,9 +238,8 @@ public Database database(final String mountPath) {
227238
}
228239

229240
/**
230-
* Returns the implementing class for Vault's lease operations (e.g. revoke, revoke-prefix).
231-
*
232-
* @return The implementing class for Vault's lease operations (e.g. revoke, revoke-prefix).
241+
* @see Sys#leases()
242+
* @deprecated This method is deprecated and in future it will be removed
233243
*/
234244
public Leases leases() {
235245
return new Leases(vaultConfig);
@@ -245,19 +255,16 @@ public Debug debug() {
245255
}
246256

247257
/**
248-
* Returns the implementing class for Vault's sys mounts operations (i.e.
249-
* <code>/v1/sys/mounts/*</code> REST endpoints).
250-
*
251-
* @return the implementing class for Vault's sys mounts operations
258+
* @see Sys#mounts()
259+
* @deprecated This method is deprecated and in future it will be removed
252260
*/
253261
public Mounts mounts() {
254262
return new Mounts(vaultConfig);
255263
}
256264

257265
/**
258-
* Returns the implementing class for Vault's seal operations (e.g. seal, unseal, sealStatus).
259-
*
260-
* @return The implementing class for Vault's seal operations (e.g. seal, unseal, sealStatus).
266+
* @see Sys#seal()
267+
* @deprecated This method is deprecated and in future it will be removed
261268
*/
262269
public Seal seal() {
263270
return new Seal(vaultConfig);

0 commit comments

Comments
 (0)