lnrpc.WalletUnlockerClient.scala Maven / Gradle / Ivy
The newest version!
// Generated by Pekko gRPC. DO NOT EDIT.
package lnrpc
import scala.concurrent.ExecutionContext
import org.apache.pekko
import pekko.actor.ClassicActorSystemProvider
import pekko.grpc.GrpcChannel
import pekko.grpc.GrpcClientCloseException
import pekko.grpc.GrpcClientSettings
import pekko.grpc.scaladsl.PekkoGrpcClient
import pekko.grpc.internal.NettyClientUtils
import pekko.grpc.PekkoGrpcGenerated
import pekko.grpc.scaladsl.SingleResponseRequestBuilder
import pekko.grpc.internal.ScalaUnaryRequestBuilder
// Not sealed so users can extend to write their stubs
@PekkoGrpcGenerated
trait WalletUnlockerClient extends WalletUnlocker with WalletUnlockerClientPowerApi with PekkoGrpcClient
@PekkoGrpcGenerated
object WalletUnlockerClient {
def apply(settings: GrpcClientSettings)(implicit sys: ClassicActorSystemProvider): WalletUnlockerClient =
new DefaultWalletUnlockerClient(GrpcChannel(settings), isChannelOwned = true)
def apply(channel: GrpcChannel)(implicit sys: ClassicActorSystemProvider): WalletUnlockerClient =
new DefaultWalletUnlockerClient(channel, isChannelOwned = false)
private class DefaultWalletUnlockerClient(channel: GrpcChannel, isChannelOwned: Boolean)(implicit sys: ClassicActorSystemProvider) extends WalletUnlockerClient {
import WalletUnlocker.MethodDescriptors._
private implicit val ex: ExecutionContext = sys.classicSystem.dispatcher
private val settings = channel.settings
private val options = NettyClientUtils.callOptions(settings)
private def genSeedRequestBuilder(channel: pekko.grpc.internal.InternalChannel) =
new ScalaUnaryRequestBuilder(genSeedDescriptor, channel, options, settings)
private def initWalletRequestBuilder(channel: pekko.grpc.internal.InternalChannel) =
new ScalaUnaryRequestBuilder(initWalletDescriptor, channel, options, settings)
private def unlockWalletRequestBuilder(channel: pekko.grpc.internal.InternalChannel) =
new ScalaUnaryRequestBuilder(unlockWalletDescriptor, channel, options, settings)
private def changePasswordRequestBuilder(channel: pekko.grpc.internal.InternalChannel) =
new ScalaUnaryRequestBuilder(changePasswordDescriptor, channel, options, settings)
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer genSeed(lnrpc.GenSeedRequest) if possible.
*/
override def genSeed(): SingleResponseRequestBuilder[lnrpc.GenSeedRequest, lnrpc.GenSeedResponse] =
genSeedRequestBuilder(channel.internalChannel)
/**
* For access to method metadata use the parameterless version of genSeed
*/
def genSeed(in: lnrpc.GenSeedRequest): scala.concurrent.Future[lnrpc.GenSeedResponse] =
genSeed().invoke(in)
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer initWallet(lnrpc.InitWalletRequest) if possible.
*/
override def initWallet(): SingleResponseRequestBuilder[lnrpc.InitWalletRequest, lnrpc.InitWalletResponse] =
initWalletRequestBuilder(channel.internalChannel)
/**
* For access to method metadata use the parameterless version of initWallet
*/
def initWallet(in: lnrpc.InitWalletRequest): scala.concurrent.Future[lnrpc.InitWalletResponse] =
initWallet().invoke(in)
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer unlockWallet(lnrpc.UnlockWalletRequest) if possible.
*/
override def unlockWallet(): SingleResponseRequestBuilder[lnrpc.UnlockWalletRequest, lnrpc.UnlockWalletResponse] =
unlockWalletRequestBuilder(channel.internalChannel)
/**
* For access to method metadata use the parameterless version of unlockWallet
*/
def unlockWallet(in: lnrpc.UnlockWalletRequest): scala.concurrent.Future[lnrpc.UnlockWalletResponse] =
unlockWallet().invoke(in)
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer changePassword(lnrpc.ChangePasswordRequest) if possible.
*/
override def changePassword(): SingleResponseRequestBuilder[lnrpc.ChangePasswordRequest, lnrpc.ChangePasswordResponse] =
changePasswordRequestBuilder(channel.internalChannel)
/**
* For access to method metadata use the parameterless version of changePassword
*/
def changePassword(in: lnrpc.ChangePasswordRequest): scala.concurrent.Future[lnrpc.ChangePasswordResponse] =
changePassword().invoke(in)
override def close(): scala.concurrent.Future[pekko.Done] =
if (isChannelOwned) channel.close()
else throw new GrpcClientCloseException()
override def closed: scala.concurrent.Future[pekko.Done] = channel.closed()
}
}
@PekkoGrpcGenerated
trait WalletUnlockerClientPowerApi {
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer genSeed(lnrpc.GenSeedRequest) if possible.
*/
def genSeed(): SingleResponseRequestBuilder[lnrpc.GenSeedRequest, lnrpc.GenSeedResponse] = ???
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer initWallet(lnrpc.InitWalletRequest) if possible.
*/
def initWallet(): SingleResponseRequestBuilder[lnrpc.InitWalletRequest, lnrpc.InitWalletResponse] = ???
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer unlockWallet(lnrpc.UnlockWalletRequest) if possible.
*/
def unlockWallet(): SingleResponseRequestBuilder[lnrpc.UnlockWalletRequest, lnrpc.UnlockWalletResponse] = ???
/**
* Lower level "lifted" version of the method, giving access to request metadata etc.
* prefer changePassword(lnrpc.ChangePasswordRequest) if possible.
*/
def changePassword(): SingleResponseRequestBuilder[lnrpc.ChangePasswordRequest, lnrpc.ChangePasswordResponse] = ???
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy