|
|
@@ -116,32 +116,32 @@ func NewAuth(c *Client) Auth {
|
|
|
}
|
|
|
|
|
|
func (auth *auth) AuthEnable(ctx context.Context) (*AuthEnableResponse, error) {
|
|
|
- resp, err := auth.remote.AuthEnable(ctx, &pb.AuthEnableRequest{})
|
|
|
+ resp, err := auth.remote.AuthEnable(ctx, &pb.AuthEnableRequest{}, grpc.FailFast(false))
|
|
|
return (*AuthEnableResponse)(resp), toErr(ctx, err)
|
|
|
}
|
|
|
|
|
|
func (auth *auth) AuthDisable(ctx context.Context) (*AuthDisableResponse, error) {
|
|
|
- resp, err := auth.remote.AuthDisable(ctx, &pb.AuthDisableRequest{})
|
|
|
+ resp, err := auth.remote.AuthDisable(ctx, &pb.AuthDisableRequest{}, grpc.FailFast(false))
|
|
|
return (*AuthDisableResponse)(resp), toErr(ctx, err)
|
|
|
}
|
|
|
|
|
|
func (auth *auth) UserAdd(ctx context.Context, name string, password string) (*AuthUserAddResponse, error) {
|
|
|
- resp, err := auth.remote.UserAdd(ctx, &pb.AuthUserAddRequest{Name: name, Password: password})
|
|
|
+ resp, err := auth.remote.UserAdd(ctx, &pb.AuthUserAddRequest{Name: name, Password: password}, grpc.FailFast(false))
|
|
|
return (*AuthUserAddResponse)(resp), toErr(ctx, err)
|
|
|
}
|
|
|
|
|
|
func (auth *auth) UserDelete(ctx context.Context, name string) (*AuthUserDeleteResponse, error) {
|
|
|
- resp, err := auth.remote.UserDelete(ctx, &pb.AuthUserDeleteRequest{Name: name})
|
|
|
+ resp, err := auth.remote.UserDelete(ctx, &pb.AuthUserDeleteRequest{Name: name}, grpc.FailFast(false))
|
|
|
return (*AuthUserDeleteResponse)(resp), toErr(ctx, err)
|
|
|
}
|
|
|
|
|
|
func (auth *auth) UserChangePassword(ctx context.Context, name string, password string) (*AuthUserChangePasswordResponse, error) {
|
|
|
- resp, err := auth.remote.UserChangePassword(ctx, &pb.AuthUserChangePasswordRequest{Name: name, Password: password})
|
|
|
+ resp, err := auth.remote.UserChangePassword(ctx, &pb.AuthUserChangePasswordRequest{Name: name, Password: password}, grpc.FailFast(false))
|
|
|
return (*AuthUserChangePasswordResponse)(resp), toErr(ctx, err)
|
|
|
}
|
|
|
|
|
|
func (auth *auth) UserGrantRole(ctx context.Context, user string, role string) (*AuthUserGrantRoleResponse, error) {
|
|
|
- resp, err := auth.remote.UserGrantRole(ctx, &pb.AuthUserGrantRoleRequest{User: user, Role: role})
|
|
|
+ resp, err := auth.remote.UserGrantRole(ctx, &pb.AuthUserGrantRoleRequest{User: user, Role: role}, grpc.FailFast(false))
|
|
|
return (*AuthUserGrantRoleResponse)(resp), toErr(ctx, err)
|
|
|
}
|
|
|
|
|
|
@@ -156,12 +156,12 @@ func (auth *auth) UserList(ctx context.Context) (*AuthUserListResponse, error) {
|
|
|
}
|
|
|
|
|
|
func (auth *auth) UserRevokeRole(ctx context.Context, name string, role string) (*AuthUserRevokeRoleResponse, error) {
|
|
|
- resp, err := auth.remote.UserRevokeRole(ctx, &pb.AuthUserRevokeRoleRequest{Name: name, Role: role})
|
|
|
+ resp, err := auth.remote.UserRevokeRole(ctx, &pb.AuthUserRevokeRoleRequest{Name: name, Role: role}, grpc.FailFast(false))
|
|
|
return (*AuthUserRevokeRoleResponse)(resp), toErr(ctx, err)
|
|
|
}
|
|
|
|
|
|
func (auth *auth) RoleAdd(ctx context.Context, name string) (*AuthRoleAddResponse, error) {
|
|
|
- resp, err := auth.remote.RoleAdd(ctx, &pb.AuthRoleAddRequest{Name: name})
|
|
|
+ resp, err := auth.remote.RoleAdd(ctx, &pb.AuthRoleAddRequest{Name: name}, grpc.FailFast(false))
|
|
|
return (*AuthRoleAddResponse)(resp), toErr(ctx, err)
|
|
|
}
|
|
|
|
|
|
@@ -186,12 +186,12 @@ func (auth *auth) RoleList(ctx context.Context) (*AuthRoleListResponse, error) {
|
|
|
}
|
|
|
|
|
|
func (auth *auth) RoleRevokePermission(ctx context.Context, role string, key, rangeEnd string) (*AuthRoleRevokePermissionResponse, error) {
|
|
|
- resp, err := auth.remote.RoleRevokePermission(ctx, &pb.AuthRoleRevokePermissionRequest{Role: role, Key: key, RangeEnd: rangeEnd})
|
|
|
+ resp, err := auth.remote.RoleRevokePermission(ctx, &pb.AuthRoleRevokePermissionRequest{Role: role, Key: key, RangeEnd: rangeEnd}, grpc.FailFast(false))
|
|
|
return (*AuthRoleRevokePermissionResponse)(resp), toErr(ctx, err)
|
|
|
}
|
|
|
|
|
|
func (auth *auth) RoleDelete(ctx context.Context, role string) (*AuthRoleDeleteResponse, error) {
|
|
|
- resp, err := auth.remote.RoleDelete(ctx, &pb.AuthRoleDeleteRequest{Role: role})
|
|
|
+ resp, err := auth.remote.RoleDelete(ctx, &pb.AuthRoleDeleteRequest{Role: role}, grpc.FailFast(false))
|
|
|
return (*AuthRoleDeleteResponse)(resp), toErr(ctx, err)
|
|
|
}
|
|
|
|