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
3232spp.protocol.instrument.event.LiveBreakpointHit.deserializer =spp.protocol.marshall.ProtocolMarshaller# deserializeLiveBreakpointHit
3333spp.protocol.platform.auth.DeveloperRole.serializer =spp.protocol.marshall.ProtocolMarshaller# serializeDeveloperRole
3434spp.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 {
4545 }
4646
4747 object Utilize {
48+ const val LIVE_MANAGEMENT_SERVICE = " spp.service.live-management-service"
4849 const val LIVE_SERVICE = " spp.service.live-service"
4950 const val LIVE_INSTRUMENT = " spp.service.live-instrument"
5051 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
3838import spp.protocol.instrument.event.LiveInstrumentRemoved
3939import spp.protocol.instrument.event.LiveLogHit
4040import spp.protocol.instrument.variable.LiveVariable
41+ import spp.protocol.platform.auth.ClientAccess
4142import spp.protocol.platform.auth.DataRedaction
4243import spp.protocol.platform.auth.DeveloperRole
4344import spp.protocol.platform.auth.RedactionType
@@ -438,4 +439,17 @@ object ProtocolMarshaller {
438439 value.getBoolean(" nativeRole" )
439440 )
440441 }
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+ }
441455}
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