Documentation ¶
Index ¶
- type ConfigInterface
- type Interface
- type PubSubClient
- func (c *PubSubClient) CreateSubscription(ctx context.Context, subscription string, topic string) error
- func (c *PubSubClient) CreateTopic(ctx context.Context, topic string) error
- func (c *PubSubClient) CreateTopicAndSubscriptions(ctx context.Context, topicSpecs []TopicSpec) error
- func (c *PubSubClient) DeleteSubscription(ctx context.Context, subsName string) error
- func (c *PubSubClient) DeleteTopic(ctx context.Context, topic string) error
- func (c *PubSubClient) GetSubscriptions(ctx context.Context) ([]SubscriptionItem, error)
- func (c *PubSubClient) GetSubscriptionsByTopic(ctx context.Context, topic string) ([]SubscriptionItem, error)
- func (c *PubSubClient) GetTopics(ctx context.Context) ([]TopicItem, error)
- func (c *PubSubClient) PublishMessage(ctx context.Context, topic string, msg string) error
- type SubscriptionItem
- type TopicItem
- type TopicSpec
- type TopicWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigInterface ¶
type Interface ¶
type Interface interface { GetTopics(ctx context.Context) ([]TopicItem, error) GetSubscriptionsByTopic(ctx context.Context, topic string) ([]SubscriptionItem, error) CreateTopic(ctx context.Context, id string) error GetSubscriptions(ctx context.Context) ([]SubscriptionItem, error) CreateSubscription(ctx context.Context, id string, topicID string) error DeleteTopic(ctx context.Context, id string) error DeleteSubscription(ctx context.Context, id string) error CreateTopicAndSubscriptions(ctx context.Context, topicSpecs []TopicSpec) error }
type PubSubClient ¶
type PubSubClient struct {
// contains filtered or unexported fields
}
func NewPubSubClient ¶
func NewPubSubClient(config ConfigInterface) *PubSubClient
func (*PubSubClient) CreateSubscription ¶
func (*PubSubClient) CreateTopic ¶
func (c *PubSubClient) CreateTopic(ctx context.Context, topic string) error
func (*PubSubClient) CreateTopicAndSubscriptions ¶
func (c *PubSubClient) CreateTopicAndSubscriptions(ctx context.Context, topicSpecs []TopicSpec) error
func (*PubSubClient) DeleteSubscription ¶
func (c *PubSubClient) DeleteSubscription(ctx context.Context, subsName string) error
func (*PubSubClient) DeleteTopic ¶
func (c *PubSubClient) DeleteTopic(ctx context.Context, topic string) error
func (*PubSubClient) GetSubscriptions ¶
func (c *PubSubClient) GetSubscriptions(ctx context.Context) ([]SubscriptionItem, error)
func (*PubSubClient) GetSubscriptionsByTopic ¶
func (c *PubSubClient) GetSubscriptionsByTopic(ctx context.Context, topic string) ([]SubscriptionItem, error)
func (*PubSubClient) GetTopics ¶
func (c *PubSubClient) GetTopics(ctx context.Context) ([]TopicItem, error)
func (*PubSubClient) PublishMessage ¶
type SubscriptionItem ¶
type TopicWrapper ¶
Click to show internal directories.
Click to hide internal directories.