Google Cloud Pub/Sub C++ Client  1.32.1
A C++ Client Library for Google Cloud Pub/Sub
Classes | Public Member Functions | List of all members
google::cloud::pubsub::v1::TopicAdminConnection Class Referenceabstract

A connection to Cloud Pub/Sub for topic-related administrative operations. More...

#include <google/cloud/pubsub/topic_admin_connection.h>

Classes

struct  CreateTopicParams
 Wrap the arguments for CreateTopic() More...
 
struct  DeleteTopicParams
 Wrap the arguments for DeleteTopic() More...
 
struct  DetachSubscriptionParams
 Wrap the arguments for DetachSubscription() More...
 
struct  GetTopicParams
 Wrap the arguments for GetTopic() More...
 
struct  ListTopicSnapshotsParams
 Wrap the arguments for ListTopicSnapshots() More...
 
struct  ListTopicsParams
 Wrap the arguments for ListTopics() More...
 
struct  ListTopicSubscriptionsParams
 Wrap the arguments for ListTopicSubscriptions() More...
 
struct  UpdateTopicParams
 Wrap the arguments for UpdateTopic() More...
 

Public Member Functions

virtual ~TopicAdminConnection ()=0
 
virtual StatusOr< google::pubsub::v1::Topic > CreateTopic (CreateTopicParams)
 Defines the interface for TopicAdminClient::CreateTopic() More...
 
virtual StatusOr< google::pubsub::v1::Topic > GetTopic (GetTopicParams)
 Defines the interface for TopicAdminClient::GetTopic() More...
 
virtual StatusOr< google::pubsub::v1::Topic > UpdateTopic (UpdateTopicParams)
 Defines the interface for TopicAdminClient::UpdateTopic() More...
 
virtual ListTopicsRange ListTopics (ListTopicsParams)
 Defines the interface for TopicAdminClient::ListTopics() More...
 
virtual Status DeleteTopic (DeleteTopicParams)
 Defines the interface for TopicAdminClient::DeleteTopic() More...
 
virtual StatusOr< google::pubsub::v1::DetachSubscriptionResponse > DetachSubscription (DetachSubscriptionParams)
 Defines the interface for TopicAdminClient::DetachSubscriptions() More...
 
virtual ListTopicSubscriptionsRange ListTopicSubscriptions (ListTopicSubscriptionsParams)
 Defines the interface for TopicAdminClient::ListTopicSubscriptions() More...
 
virtual ListTopicSnapshotsRange ListTopicSnapshots (ListTopicSnapshotsParams)
 Defines the interface for TopicAdminClient::ListTopicSnapshots() More...
 

Detailed Description

A connection to Cloud Pub/Sub for topic-related administrative operations.

This interface defines pure-virtual functions for each of the user-facing overload sets in TopicAdminClient. That is, all of TopicAdminClient's overloads will forward to the one pure-virtual function declared in this interface. This allows users to inject custom behavior (e.g., with a Google Mock object) in a TopicAdminClient object for use in their own tests.

To create a concrete instance that connects you to the real Cloud Pub/Sub service, see MakeTopicAdminConnection().

The *Params nested classes
Applications may define classes derived from TopicAdminConnection, for example, because they want to mock the class. To avoid breaking all such derived classes when we change the number or type of the arguments to the member functions we define lightweight structures to pass the arguments.

Definition at line 91 of file topic_admin_connection.h.

Constructor & Destructor Documentation

◆ ~TopicAdminConnection()

google::cloud::pubsub::v1::TopicAdminConnection::~TopicAdminConnection ( )
pure virtualdefault

Member Function Documentation

◆ CreateTopic()

StatusOr< google::pubsub::v1::Topic > google::cloud::pubsub::v1::TopicAdminConnection::CreateTopic ( CreateTopicParams  )
virtual

Defines the interface for TopicAdminClient::CreateTopic()

Definition at line 246 of file topic_admin_connection.cc.

◆ DeleteTopic()

Status google::cloud::pubsub::v1::TopicAdminConnection::DeleteTopic ( DeleteTopicParams  )
virtual

Defines the interface for TopicAdminClient::DeleteTopic()

Definition at line 267 of file topic_admin_connection.cc.

◆ DetachSubscription()

StatusOr< google::pubsub::v1::DetachSubscriptionResponse > google::cloud::pubsub::v1::TopicAdminConnection::DetachSubscription ( DetachSubscriptionParams  )
virtual

Defines the interface for TopicAdminClient::DetachSubscriptions()

Definition at line 273 of file topic_admin_connection.cc.

◆ GetTopic()

StatusOr< google::pubsub::v1::Topic > google::cloud::pubsub::v1::TopicAdminConnection::GetTopic ( GetTopicParams  )
virtual

Defines the interface for TopicAdminClient::GetTopic()

Definition at line 251 of file topic_admin_connection.cc.

◆ ListTopics()

ListTopicsRange google::cloud::pubsub::v1::TopicAdminConnection::ListTopics ( ListTopicsParams  )
virtual

Defines the interface for TopicAdminClient::ListTopics()

Definition at line 262 of file topic_admin_connection.cc.

◆ ListTopicSnapshots()

ListTopicSnapshotsRange google::cloud::pubsub::v1::TopicAdminConnection::ListTopicSnapshots ( ListTopicSnapshotsParams  )
virtual

Defines the interface for TopicAdminClient::ListTopicSnapshots()

Definition at line 283 of file topic_admin_connection.cc.

◆ ListTopicSubscriptions()

ListTopicSubscriptionsRange google::cloud::pubsub::v1::TopicAdminConnection::ListTopicSubscriptions ( ListTopicSubscriptionsParams  )
virtual

Defines the interface for TopicAdminClient::ListTopicSubscriptions()

Definition at line 277 of file topic_admin_connection.cc.

◆ UpdateTopic()

StatusOr< google::pubsub::v1::Topic > google::cloud::pubsub::v1::TopicAdminConnection::UpdateTopic ( UpdateTopicParams  )
virtual

Defines the interface for TopicAdminClient::UpdateTopic()

Definition at line 256 of file topic_admin_connection.cc.