File tree Expand file tree Collapse file tree 4 files changed +55
-0
lines changed
codegen/src/main/resources/META-INF/vertx
src/jvmMain/kotlin/spp/protocol Expand file tree Collapse file tree 4 files changed +55
-0
lines changed Original file line number Diff line number Diff line change @@ -32,3 +32,5 @@ spp.protocol.instrument.event.LiveBreakpointHit.serializer=spp.protocol.marshall
32
32
spp.protocol.instrument.event.LiveBreakpointHit.deserializer =spp.protocol.marshall.ProtocolMarshaller# deserializeLiveBreakpointHit
33
33
spp.protocol.platform.auth.DeveloperRole.serializer =spp.protocol.marshall.ProtocolMarshaller# serializeDeveloperRole
34
34
spp.protocol.platform.auth.DeveloperRole.deserializer =spp.protocol.marshall.ProtocolMarshaller# deserializeDeveloperRole
35
+ spp.protocol.platform.auth.ClientAccess.serializer =spp.protocol.marshall.ProtocolMarshaller# serializeClientAccess
36
+ spp.protocol.platform.auth.ClientAccess.deserializer =spp.protocol.marshall.ProtocolMarshaller# deserializeClientAccess
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ object SourceServices {
45
45
}
46
46
47
47
object Utilize {
48
+ const val LIVE_MANAGEMENT_SERVICE = " spp.service.live-management-service"
48
49
const val LIVE_SERVICE = " spp.service.live-service"
49
50
const val LIVE_INSTRUMENT = " spp.service.live-instrument"
50
51
const val LIVE_VIEW = " spp.service.live-view"
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import spp.protocol.instrument.event.LiveBreakpointHit
38
38
import spp.protocol.instrument.event.LiveInstrumentRemoved
39
39
import spp.protocol.instrument.event.LiveLogHit
40
40
import spp.protocol.instrument.variable.LiveVariable
41
+ import spp.protocol.platform.auth.ClientAccess
41
42
import spp.protocol.platform.auth.DataRedaction
42
43
import spp.protocol.platform.auth.DeveloperRole
43
44
import spp.protocol.platform.auth.RedactionType
@@ -438,4 +439,17 @@ object ProtocolMarshaller {
438
439
value.getBoolean(" nativeRole" )
439
440
)
440
441
}
442
+
443
+ @JvmStatic
444
+ fun serializeClientAccess (value : ClientAccess ): JsonObject {
445
+ return JsonObject (Json .encode(value))
446
+ }
447
+
448
+ @JvmStatic
449
+ fun deserializeClientAccess (value : JsonObject ): ClientAccess {
450
+ return ClientAccess (
451
+ value.getString(" id" ),
452
+ value.getString(" secret" )
453
+ )
454
+ }
441
455
}
Original file line number Diff line number Diff line change
1
+ package spp.protocol.service
2
+
3
+ import io.vertx.codegen.annotations.GenIgnore
4
+ import io.vertx.codegen.annotations.ProxyGen
5
+ import io.vertx.codegen.annotations.VertxGen
6
+ import io.vertx.core.Future
7
+ import io.vertx.core.Vertx
8
+ import io.vertx.core.eventbus.DeliveryOptions
9
+ import spp.protocol.SourceServices.Utilize.LIVE_MANAGEMENT_SERVICE
10
+ import spp.protocol.platform.auth.ClientAccess
11
+
12
+
13
+ /* *
14
+ * todo: description.
15
+ *
16
+ * @author [Brandon Fergerson](mailto:bfergerson@apache.org)
17
+ */
18
+ @ProxyGen
19
+ @VertxGen
20
+ interface LiveManagementService {
21
+
22
+ @GenIgnore
23
+ companion object {
24
+ @JvmStatic
25
+ fun createProxy (vertx : Vertx , authToken : String? = null): LiveManagementService {
26
+ val deliveryOptions = DeliveryOptions ().apply {
27
+ authToken?.let { addHeader(" auth-token" , it) }
28
+ }
29
+ return LiveManagementServiceVertxEBProxy (vertx, LIVE_MANAGEMENT_SERVICE , deliveryOptions)
30
+ }
31
+ }
32
+
33
+ fun getClientAccessors (): Future <List <ClientAccess >>
34
+ fun getClientAccess (id : String ): Future <ClientAccess ?>
35
+ fun addClientAccess (): Future <ClientAccess >
36
+ fun removeClientAccess (id : String ): Future <Boolean >
37
+ fun updateClientAccess (id : String ): Future <ClientAccess >
38
+ }
You can’t perform that action at this time.
0 commit comments