2023-11-01 16:21:17 -04:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
2020-10-09 13:18:53 -04:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2023-11-01 16:21:17 -04:00
// versions:
2025-05-23 09:42:26 -07:00
// - protoc-gen-go-grpc v1.5.1
2023-11-01 16:21:17 -04:00
// - protoc (unknown)
// source: controller/api/services/v1/account_service.proto
2020-10-09 13:18:53 -04:00
package services
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
2025-05-23 09:42:26 -07:00
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc . SupportPackageIsVersion9
2020-10-09 13:18:53 -04:00
2023-11-01 16:21:17 -04:00
const (
AccountService_GetAccount_FullMethodName = "/controller.api.services.v1.AccountService/GetAccount"
AccountService_ListAccounts_FullMethodName = "/controller.api.services.v1.AccountService/ListAccounts"
AccountService_CreateAccount_FullMethodName = "/controller.api.services.v1.AccountService/CreateAccount"
AccountService_UpdateAccount_FullMethodName = "/controller.api.services.v1.AccountService/UpdateAccount"
AccountService_DeleteAccount_FullMethodName = "/controller.api.services.v1.AccountService/DeleteAccount"
AccountService_SetPassword_FullMethodName = "/controller.api.services.v1.AccountService/SetPassword"
AccountService_ChangePassword_FullMethodName = "/controller.api.services.v1.AccountService/ChangePassword"
)
2020-10-09 13:18:53 -04:00
// AccountServiceClient is the client API for AccountService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type AccountServiceClient interface {
2024-04-08 13:55:17 -07:00
// GetAccount returns a stored account if present. The provided request must
// include the id for the account be retrieved. If missing, malformed or
// referencing a non existing account an error is returned.
2020-10-09 13:18:53 -04:00
GetAccount ( ctx context . Context , in * GetAccountRequest , opts ... grpc . CallOption ) ( * GetAccountResponse , error )
2024-04-08 13:55:17 -07:00
// ListAccounts returns a list of stored accounts which exist inside the
// provided auth method. The request must include the auth method id which
// contains the accounts being listed. If missing or malformed, an error
2020-10-09 13:18:53 -04:00
// is returned.
ListAccounts ( ctx context . Context , in * ListAccountsRequest , opts ... grpc . CallOption ) ( * ListAccountsResponse , error )
2024-04-08 13:55:17 -07:00
// CreateAccount creates and stores an account in boundary. The provided
// request must include the auth method ID in which the account will be
// created. If the auth method ID is missing, malformed, or references a non
2020-10-09 13:18:53 -04:00
// existing resource an error is returned. If a name or login_name is
2024-04-08 13:55:17 -07:00
// provided that is in use in another account in the same auth method an
2020-10-09 13:18:53 -04:00
// error is returned.
CreateAccount ( ctx context . Context , in * CreateAccountRequest , opts ... grpc . CallOption ) ( * CreateAccountResponse , error )
2024-04-08 13:55:17 -07:00
// UpdateAccount updates an existing account in boundary. The provided account
2020-10-09 13:18:53 -04:00
// must not have any read only fields set. The update mask must be included in
// the request and contain at least 1 mutable field. To unset a field's value,
// include the field in the update mask and don't set it in the provided
2024-04-08 13:55:17 -07:00
// account. An error is returned if the account id is missing or references a
2020-10-09 13:18:53 -04:00
// non-existing resource. An error is also returned if the request attempts
// to update the name or login_name to one that is already in use in the
2024-04-08 13:55:17 -07:00
// containing auth method.
2020-10-09 13:18:53 -04:00
UpdateAccount ( ctx context . Context , in * UpdateAccountRequest , opts ... grpc . CallOption ) ( * UpdateAccountResponse , error )
2024-04-08 13:55:17 -07:00
// DeleteAccount removes an account from Boundary. If the provided account Id
2020-10-09 13:18:53 -04:00
// is malformed or not provided an error is returned.
DeleteAccount ( ctx context . Context , in * DeleteAccountRequest , opts ... grpc . CallOption ) ( * DeleteAccountResponse , error )
2024-04-08 13:55:17 -07:00
// SetPassword sets the account's password to the one provided in the
2020-10-09 13:18:53 -04:00
// request. This method is intended for administration purpose and as such
// does not require the old password.
SetPassword ( ctx context . Context , in * SetPasswordRequest , opts ... grpc . CallOption ) ( * SetPasswordResponse , error )
2024-04-08 13:55:17 -07:00
// ChangePassword changes the account's password to the one provided in the
2020-10-09 13:18:53 -04:00
// request. This method is intended for end users and requires the existing
// password to be provided for authentication purposes.
ChangePassword ( ctx context . Context , in * ChangePasswordRequest , opts ... grpc . CallOption ) ( * ChangePasswordResponse , error )
}
type accountServiceClient struct {
cc grpc . ClientConnInterface
}
func NewAccountServiceClient ( cc grpc . ClientConnInterface ) AccountServiceClient {
return & accountServiceClient { cc }
}
func ( c * accountServiceClient ) GetAccount ( ctx context . Context , in * GetAccountRequest , opts ... grpc . CallOption ) ( * GetAccountResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( GetAccountResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , AccountService_GetAccount_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * accountServiceClient ) ListAccounts ( ctx context . Context , in * ListAccountsRequest , opts ... grpc . CallOption ) ( * ListAccountsResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( ListAccountsResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , AccountService_ListAccounts_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * accountServiceClient ) CreateAccount ( ctx context . Context , in * CreateAccountRequest , opts ... grpc . CallOption ) ( * CreateAccountResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( CreateAccountResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , AccountService_CreateAccount_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * accountServiceClient ) UpdateAccount ( ctx context . Context , in * UpdateAccountRequest , opts ... grpc . CallOption ) ( * UpdateAccountResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( UpdateAccountResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , AccountService_UpdateAccount_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * accountServiceClient ) DeleteAccount ( ctx context . Context , in * DeleteAccountRequest , opts ... grpc . CallOption ) ( * DeleteAccountResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( DeleteAccountResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , AccountService_DeleteAccount_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * accountServiceClient ) SetPassword ( ctx context . Context , in * SetPasswordRequest , opts ... grpc . CallOption ) ( * SetPasswordResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( SetPasswordResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , AccountService_SetPassword_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
func ( c * accountServiceClient ) ChangePassword ( ctx context . Context , in * ChangePasswordRequest , opts ... grpc . CallOption ) ( * ChangePasswordResponse , error ) {
2025-05-23 09:42:26 -07:00
cOpts := append ([] grpc . CallOption { grpc . StaticMethod ()}, opts ... )
2020-10-09 13:18:53 -04:00
out := new ( ChangePasswordResponse )
2025-05-23 09:42:26 -07:00
err := c . cc . Invoke ( ctx , AccountService_ChangePassword_FullMethodName , in , out , cOpts ... )
2020-10-09 13:18:53 -04:00
if err != nil {
return nil , err
}
return out , nil
}
// AccountServiceServer is the server API for AccountService service.
2020-11-11 14:41:05 -05:00
// All implementations must embed UnimplementedAccountServiceServer
2025-05-23 09:42:26 -07:00
// for forward compatibility.
2020-10-09 13:18:53 -04:00
type AccountServiceServer interface {
2024-04-08 13:55:17 -07:00
// GetAccount returns a stored account if present. The provided request must
// include the id for the account be retrieved. If missing, malformed or
// referencing a non existing account an error is returned.
2020-10-09 13:18:53 -04:00
GetAccount ( context . Context , * GetAccountRequest ) ( * GetAccountResponse , error )
2024-04-08 13:55:17 -07:00
// ListAccounts returns a list of stored accounts which exist inside the
// provided auth method. The request must include the auth method id which
// contains the accounts being listed. If missing or malformed, an error
2020-10-09 13:18:53 -04:00
// is returned.
ListAccounts ( context . Context , * ListAccountsRequest ) ( * ListAccountsResponse , error )
2024-04-08 13:55:17 -07:00
// CreateAccount creates and stores an account in boundary. The provided
// request must include the auth method ID in which the account will be
// created. If the auth method ID is missing, malformed, or references a non
2020-10-09 13:18:53 -04:00
// existing resource an error is returned. If a name or login_name is
2024-04-08 13:55:17 -07:00
// provided that is in use in another account in the same auth method an
2020-10-09 13:18:53 -04:00
// error is returned.
CreateAccount ( context . Context , * CreateAccountRequest ) ( * CreateAccountResponse , error )
2024-04-08 13:55:17 -07:00
// UpdateAccount updates an existing account in boundary. The provided account
2020-10-09 13:18:53 -04:00
// must not have any read only fields set. The update mask must be included in
// the request and contain at least 1 mutable field. To unset a field's value,
// include the field in the update mask and don't set it in the provided
2024-04-08 13:55:17 -07:00
// account. An error is returned if the account id is missing or references a
2020-10-09 13:18:53 -04:00
// non-existing resource. An error is also returned if the request attempts
// to update the name or login_name to one that is already in use in the
2024-04-08 13:55:17 -07:00
// containing auth method.
2020-10-09 13:18:53 -04:00
UpdateAccount ( context . Context , * UpdateAccountRequest ) ( * UpdateAccountResponse , error )
2024-04-08 13:55:17 -07:00
// DeleteAccount removes an account from Boundary. If the provided account Id
2020-10-09 13:18:53 -04:00
// is malformed or not provided an error is returned.
DeleteAccount ( context . Context , * DeleteAccountRequest ) ( * DeleteAccountResponse , error )
2024-04-08 13:55:17 -07:00
// SetPassword sets the account's password to the one provided in the
2020-10-09 13:18:53 -04:00
// request. This method is intended for administration purpose and as such
// does not require the old password.
SetPassword ( context . Context , * SetPasswordRequest ) ( * SetPasswordResponse , error )
2024-04-08 13:55:17 -07:00
// ChangePassword changes the account's password to the one provided in the
2020-10-09 13:18:53 -04:00
// request. This method is intended for end users and requires the existing
// password to be provided for authentication purposes.
ChangePassword ( context . Context , * ChangePasswordRequest ) ( * ChangePasswordResponse , error )
2020-11-11 14:41:05 -05:00
mustEmbedUnimplementedAccountServiceServer ()
2020-10-09 13:18:53 -04:00
}
2025-05-23 09:42:26 -07:00
// UnimplementedAccountServiceServer must be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedAccountServiceServer struct {}
2020-10-09 13:18:53 -04:00
2020-11-11 14:41:05 -05:00
func ( UnimplementedAccountServiceServer ) GetAccount ( context . Context , * GetAccountRequest ) ( * GetAccountResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method GetAccount not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedAccountServiceServer ) ListAccounts ( context . Context , * ListAccountsRequest ) ( * ListAccountsResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method ListAccounts not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedAccountServiceServer ) CreateAccount ( context . Context , * CreateAccountRequest ) ( * CreateAccountResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method CreateAccount not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedAccountServiceServer ) UpdateAccount ( context . Context , * UpdateAccountRequest ) ( * UpdateAccountResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method UpdateAccount not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedAccountServiceServer ) DeleteAccount ( context . Context , * DeleteAccountRequest ) ( * DeleteAccountResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method DeleteAccount not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedAccountServiceServer ) SetPassword ( context . Context , * SetPasswordRequest ) ( * SetPasswordResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method SetPassword not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedAccountServiceServer ) ChangePassword ( context . Context , * ChangePasswordRequest ) ( * ChangePasswordResponse , error ) {
2020-10-09 13:18:53 -04:00
return nil , status . Errorf ( codes . Unimplemented , "method ChangePassword not implemented" )
}
2020-11-11 14:41:05 -05:00
func ( UnimplementedAccountServiceServer ) mustEmbedUnimplementedAccountServiceServer () {}
2025-05-23 09:42:26 -07:00
func ( UnimplementedAccountServiceServer ) testEmbeddedByValue () {}
2020-10-09 13:18:53 -04:00
2020-11-11 14:41:05 -05:00
// UnsafeAccountServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to AccountServiceServer will
// result in compilation errors.
type UnsafeAccountServiceServer interface {
mustEmbedUnimplementedAccountServiceServer ()
}
func RegisterAccountServiceServer ( s grpc . ServiceRegistrar , srv AccountServiceServer ) {
2025-05-23 09:42:26 -07:00
// If the following call pancis, it indicates UnimplementedAccountServiceServer was
// embedded by pointer and is nil. This will cause panics if an
// unimplemented method is ever invoked, so we test this at initialization
// time to prevent it from happening at runtime later due to I/O.
if t , ok := srv .( interface { testEmbeddedByValue () }); ok {
t . testEmbeddedByValue ()
}
2021-02-22 12:46:00 -05:00
s . RegisterService ( & AccountService_ServiceDesc , srv )
2020-10-09 13:18:53 -04:00
}
func _AccountService_GetAccount_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( GetAccountRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( AccountServiceServer ). GetAccount ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : AccountService_GetAccount_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( AccountServiceServer ). GetAccount ( ctx , req .( * GetAccountRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _AccountService_ListAccounts_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( ListAccountsRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( AccountServiceServer ). ListAccounts ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : AccountService_ListAccounts_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( AccountServiceServer ). ListAccounts ( ctx , req .( * ListAccountsRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _AccountService_CreateAccount_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( CreateAccountRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( AccountServiceServer ). CreateAccount ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : AccountService_CreateAccount_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( AccountServiceServer ). CreateAccount ( ctx , req .( * CreateAccountRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _AccountService_UpdateAccount_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( UpdateAccountRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( AccountServiceServer ). UpdateAccount ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : AccountService_UpdateAccount_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( AccountServiceServer ). UpdateAccount ( ctx , req .( * UpdateAccountRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _AccountService_DeleteAccount_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( DeleteAccountRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( AccountServiceServer ). DeleteAccount ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : AccountService_DeleteAccount_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( AccountServiceServer ). DeleteAccount ( ctx , req .( * DeleteAccountRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _AccountService_SetPassword_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( SetPasswordRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( AccountServiceServer ). SetPassword ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : AccountService_SetPassword_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( AccountServiceServer ). SetPassword ( ctx , req .( * SetPasswordRequest ))
}
return interceptor ( ctx , in , info , handler )
}
func _AccountService_ChangePassword_Handler ( srv interface {}, ctx context . Context , dec func ( interface {}) error , interceptor grpc . UnaryServerInterceptor ) ( interface {}, error ) {
in := new ( ChangePasswordRequest )
if err := dec ( in ); err != nil {
return nil , err
}
if interceptor == nil {
return srv .( AccountServiceServer ). ChangePassword ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
2023-11-01 16:21:17 -04:00
FullMethod : AccountService_ChangePassword_FullMethodName ,
2020-10-09 13:18:53 -04:00
}
handler := func ( ctx context . Context , req interface {}) ( interface {}, error ) {
return srv .( AccountServiceServer ). ChangePassword ( ctx , req .( * ChangePasswordRequest ))
}
return interceptor ( ctx , in , info , handler )
}
2021-02-22 12:46:00 -05:00
// AccountService_ServiceDesc is the grpc.ServiceDesc for AccountService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var AccountService_ServiceDesc = grpc . ServiceDesc {
2020-10-09 13:18:53 -04:00
ServiceName : "controller.api.services.v1.AccountService" ,
HandlerType : ( * AccountServiceServer )( nil ),
Methods : [] grpc . MethodDesc {
{
MethodName : "GetAccount" ,
Handler : _AccountService_GetAccount_Handler ,
},
{
MethodName : "ListAccounts" ,
Handler : _AccountService_ListAccounts_Handler ,
},
{
MethodName : "CreateAccount" ,
Handler : _AccountService_CreateAccount_Handler ,
},
{
MethodName : "UpdateAccount" ,
Handler : _AccountService_UpdateAccount_Handler ,
},
{
MethodName : "DeleteAccount" ,
Handler : _AccountService_DeleteAccount_Handler ,
},
{
MethodName : "SetPassword" ,
Handler : _AccountService_SetPassword_Handler ,
},
{
MethodName : "ChangePassword" ,
Handler : _AccountService_ChangePassword_Handler ,
},
},
Streams : [] grpc . StreamDesc {},
Metadata : "controller/api/services/v1/account_service.proto" ,
}