Package io.etcd.jetcd
Interface Auth
-
- All Superinterfaces:
java.lang.AutoCloseable,CloseableClient
public interface Auth extends CloseableClient
Interface of auth talking to etcd.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<AuthDisableResponse>authDisable()disables auth of an etcd cluster.java.util.concurrent.CompletableFuture<AuthEnableResponse>authEnable()enables auth of an etcd cluster.java.util.concurrent.CompletableFuture<AuthRoleAddResponse>roleAdd(ByteSequence role)adds a new role to an etcd cluster.java.util.concurrent.CompletableFuture<AuthRoleDeleteResponse>roleDelete(ByteSequence role)RoleDelete deletes a role.java.util.concurrent.CompletableFuture<AuthRoleGetResponse>roleGet(ByteSequence role)gets a detailed information of a role.java.util.concurrent.CompletableFuture<AuthRoleGrantPermissionResponse>roleGrantPermission(ByteSequence role, ByteSequence key, ByteSequence rangeEnd, Permission.Type permType)grants a permission to a role.java.util.concurrent.CompletableFuture<AuthRoleListResponse>roleList()gets a list of all roles.java.util.concurrent.CompletableFuture<AuthRoleRevokePermissionResponse>roleRevokePermission(ByteSequence role, ByteSequence key, ByteSequence rangeEnd)revokes a permission from a role.java.util.concurrent.CompletableFuture<AuthUserAddResponse>userAdd(ByteSequence user, ByteSequence password)adds a new user to an etcd cluster.java.util.concurrent.CompletableFuture<AuthUserChangePasswordResponse>userChangePassword(ByteSequence user, ByteSequence password)changes a password of a user.java.util.concurrent.CompletableFuture<AuthUserDeleteResponse>userDelete(ByteSequence user)deletes a user from an etcd cluster.java.util.concurrent.CompletableFuture<AuthUserGetResponse>userGet(ByteSequence user)gets a detailed information of a user.java.util.concurrent.CompletableFuture<AuthUserGrantRoleResponse>userGrantRole(ByteSequence user, ByteSequence role)grants a role to a user.java.util.concurrent.CompletableFuture<AuthUserListResponse>userList()gets a list of all users.java.util.concurrent.CompletableFuture<AuthUserRevokeRoleResponse>userRevokeRole(ByteSequence user, ByteSequence role)revokes a role of a user.-
Methods inherited from interface io.etcd.jetcd.support.CloseableClient
close
-
-
-
-
Method Detail
-
authEnable
java.util.concurrent.CompletableFuture<AuthEnableResponse> authEnable()
enables auth of an etcd cluster.- Returns:
- the response.
-
authDisable
java.util.concurrent.CompletableFuture<AuthDisableResponse> authDisable()
disables auth of an etcd cluster.- Returns:
- the response.
-
userAdd
java.util.concurrent.CompletableFuture<AuthUserAddResponse> userAdd(ByteSequence user, ByteSequence password)
adds a new user to an etcd cluster.- Parameters:
user- the userpassword- the password- Returns:
- the response.
-
userDelete
java.util.concurrent.CompletableFuture<AuthUserDeleteResponse> userDelete(ByteSequence user)
deletes a user from an etcd cluster.- Parameters:
user- the user- Returns:
- the response.
-
userChangePassword
java.util.concurrent.CompletableFuture<AuthUserChangePasswordResponse> userChangePassword(ByteSequence user, ByteSequence password)
changes a password of a user.- Parameters:
user- the userpassword- the password- Returns:
- the response.
-
userGet
java.util.concurrent.CompletableFuture<AuthUserGetResponse> userGet(ByteSequence user)
gets a detailed information of a user.- Parameters:
user- the user- Returns:
- the response.
-
userList
java.util.concurrent.CompletableFuture<AuthUserListResponse> userList()
gets a list of all users.- Returns:
- the response.
-
userGrantRole
java.util.concurrent.CompletableFuture<AuthUserGrantRoleResponse> userGrantRole(ByteSequence user, ByteSequence role)
grants a role to a user.- Parameters:
user- the userrole- the role to grant- Returns:
- the response.
-
userRevokeRole
java.util.concurrent.CompletableFuture<AuthUserRevokeRoleResponse> userRevokeRole(ByteSequence user, ByteSequence role)
revokes a role of a user.- Parameters:
user- the userrole- the role to revoke- Returns:
- the response.
-
roleAdd
java.util.concurrent.CompletableFuture<AuthRoleAddResponse> roleAdd(ByteSequence role)
adds a new role to an etcd cluster.- Parameters:
role- the role to add- Returns:
- the response.
-
roleGrantPermission
java.util.concurrent.CompletableFuture<AuthRoleGrantPermissionResponse> roleGrantPermission(ByteSequence role, ByteSequence key, ByteSequence rangeEnd, Permission.Type permType)
grants a permission to a role.- Parameters:
role- the rolekey- the keyrangeEnd- the range endpermType- the type- Returns:
- the response.
-
roleGet
java.util.concurrent.CompletableFuture<AuthRoleGetResponse> roleGet(ByteSequence role)
gets a detailed information of a role.- Parameters:
role- the role to get- Returns:
- the response.
-
roleList
java.util.concurrent.CompletableFuture<AuthRoleListResponse> roleList()
gets a list of all roles.- Returns:
- the response.
-
roleRevokePermission
java.util.concurrent.CompletableFuture<AuthRoleRevokePermissionResponse> roleRevokePermission(ByteSequence role, ByteSequence key, ByteSequence rangeEnd)
revokes a permission from a role.- Parameters:
role- the rolekey- the keyrangeEnd- the range end- Returns:
- the response.
-
roleDelete
java.util.concurrent.CompletableFuture<AuthRoleDeleteResponse> roleDelete(ByteSequence role)
RoleDelete deletes a role.- Parameters:
role- the role to delete.- Returns:
- the response.
-
-