io.etcd.jetcd.api.VertxAuthGrpc Maven / Gradle / Ivy
The newest version!
package io.etcd.jetcd.api;
import static io.etcd.jetcd.api.AuthGrpc.getServiceDescriptor;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
@javax.annotation.Generated(
value = "by VertxGrpc generator",
comments = "Source: rpc.proto")
public final class VertxAuthGrpc {
private VertxAuthGrpc() {}
public static AuthVertxStub newVertxStub(io.grpc.Channel channel) {
return new AuthVertxStub(channel);
}
public static final class AuthVertxStub extends io.grpc.stub.AbstractStub {
private final io.vertx.core.impl.ContextInternal ctx;
private AuthGrpc.AuthStub delegateStub;
private AuthVertxStub(io.grpc.Channel channel) {
super(channel);
delegateStub = AuthGrpc.newStub(channel);
this.ctx = (io.vertx.core.impl.ContextInternal) io.vertx.core.Vertx.currentContext();
}
private AuthVertxStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
super(channel, callOptions);
delegateStub = AuthGrpc.newStub(channel).build(channel, callOptions);
this.ctx = (io.vertx.core.impl.ContextInternal) io.vertx.core.Vertx.currentContext();
}
@Override
protected AuthVertxStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
return new AuthVertxStub(channel, callOptions);
}
/**
*
* Range gets the keys in the range from the key-value store.
*
*/
public io.vertx.core.Future authEnable(io.etcd.jetcd.api.AuthEnableRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::authEnable);
}
/**
*
* Put puts the given key into the key-value store.
* A put request increments the revision of the key-value store
* and generates one event in the event history.
*
*/
public io.vertx.core.Future authDisable(io.etcd.jetcd.api.AuthDisableRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::authDisable);
}
/**
*
* DeleteRange deletes the given range from the key-value store.
* A delete request increments the revision of the key-value store
* and generates a delete event in the event history for every deleted key.
*
*/
public io.vertx.core.Future authenticate(io.etcd.jetcd.api.AuthenticateRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::authenticate);
}
/**
*
* Txn processes multiple requests in a single transaction.
* A txn request increments the revision of the key-value store
* and generates events with the same revision for every completed request.
* It is not allowed to modify the same key several times within one txn.
*
*/
public io.vertx.core.Future userAdd(io.etcd.jetcd.api.AuthUserAddRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::userAdd);
}
/**
*
* Compact compacts the event history in the etcd key-value store. The key-value
* store should be periodically compacted or the event history will continue to grow
* indefinitely.
*
*/
public io.vertx.core.Future userGet(io.etcd.jetcd.api.AuthUserGetRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::userGet);
}
/**
*
* Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
*
*/
public io.vertx.core.Future userList(io.etcd.jetcd.api.AuthUserListRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::userList);
}
/**
*
* MoveLeader requests current leader node to transfer its leadership to transferee.
*
*/
public io.vertx.core.Future userDelete(io.etcd.jetcd.api.AuthUserDeleteRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::userDelete);
}
/**
*
* UserChangePassword changes the password of a specified user.
*
*/
public io.vertx.core.Future userChangePassword(io.etcd.jetcd.api.AuthUserChangePasswordRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::userChangePassword);
}
/**
*
* UserGrant grants a role to a specified user.
*
*/
public io.vertx.core.Future userGrantRole(io.etcd.jetcd.api.AuthUserGrantRoleRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::userGrantRole);
}
/**
*
* UserRevokeRole revokes a role of specified user.
*
*/
public io.vertx.core.Future userRevokeRole(io.etcd.jetcd.api.AuthUserRevokeRoleRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::userRevokeRole);
}
/**
*
* RoleAdd adds a new role.
*
*/
public io.vertx.core.Future roleAdd(io.etcd.jetcd.api.AuthRoleAddRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::roleAdd);
}
/**
*
* RoleGet gets detailed role information.
*
*/
public io.vertx.core.Future roleGet(io.etcd.jetcd.api.AuthRoleGetRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::roleGet);
}
/**
*
* RoleList gets lists of all roles.
*
*/
public io.vertx.core.Future roleList(io.etcd.jetcd.api.AuthRoleListRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::roleList);
}
/**
*
* RoleDelete deletes a specified role.
*
*/
public io.vertx.core.Future roleDelete(io.etcd.jetcd.api.AuthRoleDeleteRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::roleDelete);
}
/**
*
* RoleGrantPermission grants a permission of a specified key or range to a specified role.
*
*/
public io.vertx.core.Future roleGrantPermission(io.etcd.jetcd.api.AuthRoleGrantPermissionRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::roleGrantPermission);
}
/**
*
* RoleRevokePermission revokes a key or range permission of a specified role.
*
*/
public io.vertx.core.Future roleRevokePermission(io.etcd.jetcd.api.AuthRoleRevokePermissionRequest request) {
return io.vertx.grpc.stub.ClientCalls.oneToOne(ctx, request, delegateStub::roleRevokePermission);
}
}
public static abstract class AuthVertxImplBase implements io.grpc.BindableService {
private String compression;
/**
* Set whether the server will try to use a compressed response.
*
* @param compression the compression, e.g {@code gzip}
*/
public AuthVertxImplBase withCompression(String compression) {
this.compression = compression;
return this;
}
/**
*
* Range gets the keys in the range from the key-value store.
*
*/
public io.vertx.core.Future authEnable(io.etcd.jetcd.api.AuthEnableRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* Put puts the given key into the key-value store.
* A put request increments the revision of the key-value store
* and generates one event in the event history.
*
*/
public io.vertx.core.Future authDisable(io.etcd.jetcd.api.AuthDisableRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* DeleteRange deletes the given range from the key-value store.
* A delete request increments the revision of the key-value store
* and generates a delete event in the event history for every deleted key.
*
*/
public io.vertx.core.Future authenticate(io.etcd.jetcd.api.AuthenticateRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* Txn processes multiple requests in a single transaction.
* A txn request increments the revision of the key-value store
* and generates events with the same revision for every completed request.
* It is not allowed to modify the same key several times within one txn.
*
*/
public io.vertx.core.Future userAdd(io.etcd.jetcd.api.AuthUserAddRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* Compact compacts the event history in the etcd key-value store. The key-value
* store should be periodically compacted or the event history will continue to grow
* indefinitely.
*
*/
public io.vertx.core.Future userGet(io.etcd.jetcd.api.AuthUserGetRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* Snapshot sends a snapshot of the entire backend from a member over a stream to a client.
*
*/
public io.vertx.core.Future userList(io.etcd.jetcd.api.AuthUserListRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* MoveLeader requests current leader node to transfer its leadership to transferee.
*
*/
public io.vertx.core.Future userDelete(io.etcd.jetcd.api.AuthUserDeleteRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* UserChangePassword changes the password of a specified user.
*
*/
public io.vertx.core.Future userChangePassword(io.etcd.jetcd.api.AuthUserChangePasswordRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* UserGrant grants a role to a specified user.
*
*/
public io.vertx.core.Future userGrantRole(io.etcd.jetcd.api.AuthUserGrantRoleRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* UserRevokeRole revokes a role of specified user.
*
*/
public io.vertx.core.Future userRevokeRole(io.etcd.jetcd.api.AuthUserRevokeRoleRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* RoleAdd adds a new role.
*
*/
public io.vertx.core.Future roleAdd(io.etcd.jetcd.api.AuthRoleAddRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* RoleGet gets detailed role information.
*
*/
public io.vertx.core.Future roleGet(io.etcd.jetcd.api.AuthRoleGetRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* RoleList gets lists of all roles.
*
*/
public io.vertx.core.Future roleList(io.etcd.jetcd.api.AuthRoleListRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* RoleDelete deletes a specified role.
*
*/
public io.vertx.core.Future roleDelete(io.etcd.jetcd.api.AuthRoleDeleteRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* RoleGrantPermission grants a permission of a specified key or range to a specified role.
*
*/
public io.vertx.core.Future roleGrantPermission(io.etcd.jetcd.api.AuthRoleGrantPermissionRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
/**
*
* RoleRevokePermission revokes a key or range permission of a specified role.
*
*/
public io.vertx.core.Future roleRevokePermission(io.etcd.jetcd.api.AuthRoleRevokePermissionRequest request) {
throw new io.grpc.StatusRuntimeException(io.grpc.Status.UNIMPLEMENTED);
}
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getAuthEnableMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthEnableRequest,
io.etcd.jetcd.api.AuthEnableResponse>(
this, METHODID_AUTH_ENABLE, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getAuthDisableMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthDisableRequest,
io.etcd.jetcd.api.AuthDisableResponse>(
this, METHODID_AUTH_DISABLE, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getAuthenticateMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthenticateRequest,
io.etcd.jetcd.api.AuthenticateResponse>(
this, METHODID_AUTHENTICATE, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getUserAddMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthUserAddRequest,
io.etcd.jetcd.api.AuthUserAddResponse>(
this, METHODID_USER_ADD, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getUserGetMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthUserGetRequest,
io.etcd.jetcd.api.AuthUserGetResponse>(
this, METHODID_USER_GET, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getUserListMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthUserListRequest,
io.etcd.jetcd.api.AuthUserListResponse>(
this, METHODID_USER_LIST, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getUserDeleteMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthUserDeleteRequest,
io.etcd.jetcd.api.AuthUserDeleteResponse>(
this, METHODID_USER_DELETE, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getUserChangePasswordMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthUserChangePasswordRequest,
io.etcd.jetcd.api.AuthUserChangePasswordResponse>(
this, METHODID_USER_CHANGE_PASSWORD, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getUserGrantRoleMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthUserGrantRoleRequest,
io.etcd.jetcd.api.AuthUserGrantRoleResponse>(
this, METHODID_USER_GRANT_ROLE, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getUserRevokeRoleMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthUserRevokeRoleRequest,
io.etcd.jetcd.api.AuthUserRevokeRoleResponse>(
this, METHODID_USER_REVOKE_ROLE, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getRoleAddMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthRoleAddRequest,
io.etcd.jetcd.api.AuthRoleAddResponse>(
this, METHODID_ROLE_ADD, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getRoleGetMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthRoleGetRequest,
io.etcd.jetcd.api.AuthRoleGetResponse>(
this, METHODID_ROLE_GET, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getRoleListMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthRoleListRequest,
io.etcd.jetcd.api.AuthRoleListResponse>(
this, METHODID_ROLE_LIST, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getRoleDeleteMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthRoleDeleteRequest,
io.etcd.jetcd.api.AuthRoleDeleteResponse>(
this, METHODID_ROLE_DELETE, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getRoleGrantPermissionMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthRoleGrantPermissionRequest,
io.etcd.jetcd.api.AuthRoleGrantPermissionResponse>(
this, METHODID_ROLE_GRANT_PERMISSION, compression)))
.addMethod(
io.etcd.jetcd.api.AuthGrpc.getRoleRevokePermissionMethod(),
asyncUnaryCall(
new MethodHandlers<
io.etcd.jetcd.api.AuthRoleRevokePermissionRequest,
io.etcd.jetcd.api.AuthRoleRevokePermissionResponse>(
this, METHODID_ROLE_REVOKE_PERMISSION, compression)))
.build();
}
}
private static final int METHODID_AUTH_ENABLE = 0;
private static final int METHODID_AUTH_DISABLE = 1;
private static final int METHODID_AUTHENTICATE = 2;
private static final int METHODID_USER_ADD = 3;
private static final int METHODID_USER_GET = 4;
private static final int METHODID_USER_LIST = 5;
private static final int METHODID_USER_DELETE = 6;
private static final int METHODID_USER_CHANGE_PASSWORD = 7;
private static final int METHODID_USER_GRANT_ROLE = 8;
private static final int METHODID_USER_REVOKE_ROLE = 9;
private static final int METHODID_ROLE_ADD = 10;
private static final int METHODID_ROLE_GET = 11;
private static final int METHODID_ROLE_LIST = 12;
private static final int METHODID_ROLE_DELETE = 13;
private static final int METHODID_ROLE_GRANT_PERMISSION = 14;
private static final int METHODID_ROLE_REVOKE_PERMISSION = 15;
private static final class MethodHandlers implements
io.grpc.stub.ServerCalls.UnaryMethod,
io.grpc.stub.ServerCalls.ServerStreamingMethod,
io.grpc.stub.ServerCalls.ClientStreamingMethod,
io.grpc.stub.ServerCalls.BidiStreamingMethod {
private final AuthVertxImplBase serviceImpl;
private final int methodId;
private final String compression;
MethodHandlers(AuthVertxImplBase serviceImpl, int methodId, String compression) {
this.serviceImpl = serviceImpl;
this.methodId = methodId;
this.compression = compression;
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
case METHODID_AUTH_ENABLE:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthEnableRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::authEnable);
break;
case METHODID_AUTH_DISABLE:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthDisableRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::authDisable);
break;
case METHODID_AUTHENTICATE:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthenticateRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::authenticate);
break;
case METHODID_USER_ADD:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthUserAddRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::userAdd);
break;
case METHODID_USER_GET:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthUserGetRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::userGet);
break;
case METHODID_USER_LIST:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthUserListRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::userList);
break;
case METHODID_USER_DELETE:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthUserDeleteRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::userDelete);
break;
case METHODID_USER_CHANGE_PASSWORD:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthUserChangePasswordRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::userChangePassword);
break;
case METHODID_USER_GRANT_ROLE:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthUserGrantRoleRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::userGrantRole);
break;
case METHODID_USER_REVOKE_ROLE:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthUserRevokeRoleRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::userRevokeRole);
break;
case METHODID_ROLE_ADD:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthRoleAddRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::roleAdd);
break;
case METHODID_ROLE_GET:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthRoleGetRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::roleGet);
break;
case METHODID_ROLE_LIST:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthRoleListRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::roleList);
break;
case METHODID_ROLE_DELETE:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthRoleDeleteRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::roleDelete);
break;
case METHODID_ROLE_GRANT_PERMISSION:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthRoleGrantPermissionRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::roleGrantPermission);
break;
case METHODID_ROLE_REVOKE_PERMISSION:
io.vertx.grpc.stub.ServerCalls.oneToOne(
(io.etcd.jetcd.api.AuthRoleRevokePermissionRequest) request,
(io.grpc.stub.StreamObserver) responseObserver,
compression,
serviceImpl::roleRevokePermission);
break;
default:
throw new java.lang.AssertionError();
}
}
@java.lang.Override
@java.lang.SuppressWarnings("unchecked")
public io.grpc.stub.StreamObserver invoke(io.grpc.stub.StreamObserver responseObserver) {
switch (methodId) {
default:
throw new java.lang.AssertionError();
}
}
}
}