Google Cloud Spanner C++ Client 2.13.0
A C++ Client Library for Google Cloud Spanner
Loading...
Searching...
No Matches
Public Member Functions | List of all members
google::cloud::spanner_mocks::MockDatabaseAdminConnection Class Referenceabstract

A class to mock google::cloud::spanner::DatabaseAdminConnection. More...

#include <google/cloud/spanner/mocks/mock_database_admin_connection.h>

Public Member Functions

 MOCK_METHOD (future< StatusOr< google::spanner::admin::database::v1::Database > >, CreateDatabase,(CreateDatabaseParams),(override))
 
 MOCK_METHOD (StatusOr< google::spanner::admin::database::v1::Database >, GetDatabase,(GetDatabaseParams),(override))
 
 MOCK_METHOD (StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse >, GetDatabaseDdl,(GetDatabaseDdlParams),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > >, UpdateDatabase,(UpdateDatabaseParams),(override))
 
 MOCK_METHOD (Status, DropDatabase,(DropDatabaseParams),(override))
 
 MOCK_METHOD (spanner::ListDatabaseRange, ListDatabases,(ListDatabasesParams),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::database::v1::Database > >, RestoreDatabase,(RestoreDatabaseParams),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::Policy >, GetIamPolicy,(GetIamPolicyParams),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::Policy >, SetIamPolicy,(SetIamPolicyParams),(override))
 
 MOCK_METHOD (StatusOr< google::iam::v1::TestIamPermissionsResponse >, TestIamPermissions,(TestIamPermissionsParams),(override))
 
 MOCK_METHOD (future< StatusOr< google::spanner::admin::database::v1::Backup > >, CreateBackup,(CreateBackupParams),(override))
 
 MOCK_METHOD (StatusOr< google::spanner::admin::database::v1::Backup >, GetBackup,(GetBackupParams),(override))
 
 MOCK_METHOD (Status, DeleteBackup,(DeleteBackupParams),(override))
 
 MOCK_METHOD (spanner::ListBackupsRange, ListBackups,(ListBackupsParams),(override))
 
 MOCK_METHOD (StatusOr< google::spanner::admin::database::v1::Backup >, UpdateBackup,(UpdateBackupParams),(override))
 
 MOCK_METHOD (spanner::ListBackupOperationsRange, ListBackupOperations,(ListBackupOperationsParams),(override))
 
 MOCK_METHOD (spanner::ListDatabaseOperationsRange, ListDatabaseOperations,(ListDatabaseOperationsParams),(override))
 
virtual Options options ()
 
virtual future< StatusOr< google::spanner::admin::database::v1::Database > > CreateDatabase (CreateDatabaseParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.CreateDatabase RPC. More...
 
virtual StatusOr< google::spanner::admin::database::v1::Database > GetDatabase (GetDatabaseParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.GetDatabase RPC. More...
 
virtual StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse > GetDatabaseDdl (GetDatabaseDdlParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.GetDatabaseDdl RPC. More...
 
virtual future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > > UpdateDatabase (UpdateDatabaseParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.UpdateDatabase RPC. More...
 
virtual Status DropDatabase (DropDatabaseParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.DropDatabase RPC. More...
 
virtual ListDatabaseRange ListDatabases (ListDatabasesParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.DropDatabase RPC. More...
 
virtual future< StatusOr< google::spanner::admin::database::v1::Database > > RestoreDatabase (RestoreDatabaseParams)
 Define the interface for a google.spanner.v1.DatabaseAdmin.RestoreDatabase RPC. More...
 
virtual StatusOr< google::iam::v1::Policy > GetIamPolicy (GetIamPolicyParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.GetIamPolicy RPC. More...
 
virtual StatusOr< google::iam::v1::Policy > SetIamPolicy (SetIamPolicyParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.SetIamPolicy RPC. More...
 
virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > TestIamPermissions (TestIamPermissionsParams)=0
 Define the interface for a google.spanner.v1.DatabaseAdmin.TestIamPermissions RPC. More...
 
virtual future< StatusOr< google::spanner::admin::database::v1::Backup > > CreateBackup (CreateBackupParams)
 Define the interface for a google.spanner.v1.DatabaseAdmin.CreateBackup RPC. More...
 
virtual StatusOr< google::spanner::admin::database::v1::Backup > GetBackup (GetBackupParams)
 Define the interface for a google.spanner.v1.DatabaseAdmin.GetBackup RPC. More...
 
virtual Status DeleteBackup (DeleteBackupParams)
 Define the interface for a google.spanner.v1.DatabaseAdmin.DeleteBackup RPC. More...
 
virtual ListBackupsRange ListBackups (ListBackupsParams)
 Define the interface for a google.spanner.v1.DatabaseAdmin.ListBackups RPC. More...
 
virtual StatusOr< google::spanner::admin::database::v1::Backup > UpdateBackup (UpdateBackupParams)
 Define the interface for a google.spanner.v1.DatabaseAdmin.UpdateBackup RPC. More...
 
virtual ListBackupOperationsRange ListBackupOperations (ListBackupOperationsParams)
 Define the interface for a google.spanner.v1.DatabaseAdmin.ListBackupOperations RPC. More...
 
virtual ListDatabaseOperationsRange ListDatabaseOperations (ListDatabaseOperationsParams)
 Define the interface for a google.spanner.v1.DatabaseAdmin.ListDatabaseOperations RPC. More...
 

Detailed Description

A class to mock google::cloud::spanner::DatabaseAdminConnection.

Application developers may want to test their code with simulated responses, including errors from a spanner::DatabaseAdminClient. To do so, construct a spanner::DatabaseAdminClient with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.

Member Function Documentation

◆ CreateBackup()

virtual future< StatusOr< google::spanner::admin::database::v1::Backup > > google::cloud::spanner::DatabaseAdminConnection::CreateBackup ( CreateBackupParams  )
virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.CreateBackup RPC.

◆ CreateDatabase()

virtual future< StatusOr< google::spanner::admin::database::v1::Database > > google::cloud::spanner::DatabaseAdminConnection::CreateDatabase ( CreateDatabaseParams  )
pure virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.CreateDatabase RPC.

◆ DeleteBackup()

virtual Status google::cloud::spanner::DatabaseAdminConnection::DeleteBackup ( DeleteBackupParams  )
virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.DeleteBackup RPC.

◆ DropDatabase()

virtual Status google::cloud::spanner::DatabaseAdminConnection::DropDatabase ( DropDatabaseParams  )
pure virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.DropDatabase RPC.

◆ GetBackup()

virtual StatusOr< google::spanner::admin::database::v1::Backup > google::cloud::spanner::DatabaseAdminConnection::GetBackup ( GetBackupParams  )
virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.GetBackup RPC.

◆ GetDatabase()

virtual StatusOr< google::spanner::admin::database::v1::Database > google::cloud::spanner::DatabaseAdminConnection::GetDatabase ( GetDatabaseParams  )
pure virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.GetDatabase RPC.

◆ GetDatabaseDdl()

virtual StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse > google::cloud::spanner::DatabaseAdminConnection::GetDatabaseDdl ( GetDatabaseDdlParams  )
pure virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.GetDatabaseDdl RPC.

◆ GetIamPolicy()

virtual StatusOr< google::iam::v1::Policy > google::cloud::spanner::DatabaseAdminConnection::GetIamPolicy ( GetIamPolicyParams  )
pure virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.GetIamPolicy RPC.

◆ ListBackupOperations()

virtual ListBackupOperationsRange google::cloud::spanner::DatabaseAdminConnection::ListBackupOperations ( ListBackupOperationsParams  )
virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.ListBackupOperations RPC.

◆ ListBackups()

virtual ListBackupsRange google::cloud::spanner::DatabaseAdminConnection::ListBackups ( ListBackupsParams  )
virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.ListBackups RPC.

◆ ListDatabaseOperations()

virtual ListDatabaseOperationsRange google::cloud::spanner::DatabaseAdminConnection::ListDatabaseOperations ( ListDatabaseOperationsParams  )
virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.ListDatabaseOperations RPC.

◆ ListDatabases()

virtual ListDatabaseRange google::cloud::spanner::DatabaseAdminConnection::ListDatabases ( ListDatabasesParams  )
pure virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.DropDatabase RPC.

◆ MOCK_METHOD() [1/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::database::v1::Backup > >  ,
CreateBackup  ,
(CreateBackupParams ,
(override)   
)

◆ MOCK_METHOD() [2/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::database::v1::Database > >  ,
CreateDatabase  ,
(CreateDatabaseParams ,
(override)   
)

◆ MOCK_METHOD() [3/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::database::v1::Database > >  ,
RestoreDatabase  ,
(RestoreDatabaseParams ,
(override)   
)

◆ MOCK_METHOD() [4/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > >  ,
UpdateDatabase  ,
(UpdateDatabaseParams ,
(override)   
)

◆ MOCK_METHOD() [5/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( spanner::ListBackupOperationsRange  ,
ListBackupOperations  ,
(ListBackupOperationsParams ,
(override)   
)

◆ MOCK_METHOD() [6/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( spanner::ListBackupsRange  ,
ListBackups  ,
(ListBackupsParams ,
(override)   
)

◆ MOCK_METHOD() [7/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( spanner::ListDatabaseOperationsRange  ,
ListDatabaseOperations  ,
(ListDatabaseOperationsParams ,
(override)   
)

◆ MOCK_METHOD() [8/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( spanner::ListDatabaseRange  ,
ListDatabases  ,
(ListDatabasesParams ,
(override)   
)

◆ MOCK_METHOD() [9/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( Status  ,
DeleteBackup  ,
(DeleteBackupParams ,
(override)   
)

◆ MOCK_METHOD() [10/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( Status  ,
DropDatabase  ,
(DropDatabaseParams ,
(override)   
)

◆ MOCK_METHOD() [11/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::iam::v1::Policy >  ,
GetIamPolicy  ,
(GetIamPolicyParams ,
(override)   
)

◆ MOCK_METHOD() [12/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::iam::v1::Policy >  ,
SetIamPolicy  ,
(SetIamPolicyParams ,
(override)   
)

◆ MOCK_METHOD() [13/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::iam::v1::TestIamPermissionsResponse >  ,
TestIamPermissions  ,
(TestIamPermissionsParams ,
(override)   
)

◆ MOCK_METHOD() [14/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::spanner::admin::database::v1::Backup >  ,
GetBackup  ,
(GetBackupParams ,
(override)   
)

◆ MOCK_METHOD() [15/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::spanner::admin::database::v1::Backup >  ,
UpdateBackup  ,
(UpdateBackupParams ,
(override)   
)

◆ MOCK_METHOD() [16/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::spanner::admin::database::v1::Database >  ,
GetDatabase  ,
(GetDatabaseParams ,
(override)   
)

◆ MOCK_METHOD() [17/17]

google::cloud::spanner_mocks::MockDatabaseAdminConnection::MOCK_METHOD ( StatusOr< google::spanner::admin::database::v1::GetDatabaseDdlResponse >  ,
GetDatabaseDdl  ,
(GetDatabaseDdlParams ,
(override)   
)

◆ options()

virtual Options google::cloud::spanner::DatabaseAdminConnection::options ( )
inlinevirtualinherited

◆ RestoreDatabase()

virtual future< StatusOr< google::spanner::admin::database::v1::Database > > google::cloud::spanner::DatabaseAdminConnection::RestoreDatabase ( RestoreDatabaseParams  )
virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.RestoreDatabase RPC.

◆ SetIamPolicy()

virtual StatusOr< google::iam::v1::Policy > google::cloud::spanner::DatabaseAdminConnection::SetIamPolicy ( SetIamPolicyParams  )
pure virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.SetIamPolicy RPC.

◆ TestIamPermissions()

virtual StatusOr< google::iam::v1::TestIamPermissionsResponse > google::cloud::spanner::DatabaseAdminConnection::TestIamPermissions ( TestIamPermissionsParams  )
pure virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.TestIamPermissions RPC.

◆ UpdateBackup()

virtual StatusOr< google::spanner::admin::database::v1::Backup > google::cloud::spanner::DatabaseAdminConnection::UpdateBackup ( UpdateBackupParams  )
virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.UpdateBackup RPC.

◆ UpdateDatabase()

virtual future< StatusOr< google::spanner::admin::database::v1::UpdateDatabaseDdlMetadata > > google::cloud::spanner::DatabaseAdminConnection::UpdateDatabase ( UpdateDatabaseParams  )
pure virtualinherited

Define the interface for a google.spanner.v1.DatabaseAdmin.UpdateDatabase RPC.