Documentation ¶
Index ¶
- Constants
- type MockBaseClient
- type MockPublishResult
- type MockPubsubClient
- type MockPubsubMessage
- type MockPubsubOptions
- type MockPubsubTopic
- func (s *MockPubsubTopic) Exists(ctx context.Context) (bool, error)
- func (s *MockPubsubTopic) ID() string
- func (s *MockPubsubTopic) Publish(ctx context.Context, msg ifaces_pubsub.Message) ifaces_pubsub.PublishResult
- func (s *MockPubsubTopic) String() string
- func (s *MockPubsubTopic) Subscriptions(ctx context.Context) ifaces_pubsub.SubscriptionIterator
- type MockSubscription
- type MockSubscriptionIterator
- type MockTopicIterator
Constants ¶
View Source
const MockProjectID = "mock-project"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockBaseClient ¶
type MockBaseClient struct { Messages map[string][]ifaces_pubsub.Message CompleteError error }
func (MockBaseClient) Acknowledge ¶
func (m MockBaseClient) Acknowledge(ctx context.Context, req *pubsubpb.AcknowledgeRequest, opts ...gax.CallOption) error
func (MockBaseClient) Close ¶
func (m MockBaseClient) Close() error
func (MockBaseClient) Pull ¶
func (m MockBaseClient) Pull(ctx context.Context, req *pubsubpb.PullRequest, opts ...gax.CallOption) (*pubsubpb.PullResponse, error)
type MockPublishResult ¶
type MockPublishResult struct {
// contains filtered or unexported fields
}
type MockPubsubClient ¶
type MockPubsubClient struct { ifaces_pubsub.PubsubClient PublishedMessages map[string][]ifaces_pubsub.Message // contains filtered or unexported fields }
func NewMockPubsubClient ¶
func NewMockPubsubClient(opts MockPubsubOptions) *MockPubsubClient
func (*MockPubsubClient) Topic ¶
func (s *MockPubsubClient) Topic(name string) ifaces_pubsub.Topic
func (*MockPubsubClient) Topics ¶
func (s *MockPubsubClient) Topics(context.Context) ifaces_pubsub.TopicIterator
type MockPubsubMessage ¶
func (MockPubsubMessage) Ack ¶
func (m MockPubsubMessage) Ack()
func (MockPubsubMessage) Attributes ¶
func (m MockPubsubMessage) Attributes() map[string]string
func (MockPubsubMessage) Data ¶
func (m MockPubsubMessage) Data() []byte
func (MockPubsubMessage) ID ¶
func (m MockPubsubMessage) ID() string
func (MockPubsubMessage) Nack ¶
func (m MockPubsubMessage) Nack()
func (MockPubsubMessage) PublishTime ¶
func (m MockPubsubMessage) PublishTime() time.Time
type MockPubsubOptions ¶
type MockPubsubOptions struct { Topics []string Messages map[string][]ifaces_pubsub.Message }
type MockPubsubTopic ¶
type MockPubsubTopic struct {
// contains filtered or unexported fields
}
func (*MockPubsubTopic) Exists ¶
func (s *MockPubsubTopic) Exists(ctx context.Context) (bool, error)
func (*MockPubsubTopic) ID ¶
func (s *MockPubsubTopic) ID() string
func (*MockPubsubTopic) Publish ¶
func (s *MockPubsubTopic) Publish(ctx context.Context, msg ifaces_pubsub.Message) ifaces_pubsub.PublishResult
func (*MockPubsubTopic) String ¶
func (s *MockPubsubTopic) String() string
func (*MockPubsubTopic) Subscriptions ¶
func (s *MockPubsubTopic) Subscriptions(ctx context.Context) ifaces_pubsub.SubscriptionIterator
type MockSubscription ¶
type MockSubscription struct {
// contains filtered or unexported fields
}
func (MockSubscription) ID ¶
func (m MockSubscription) ID() string
func (MockSubscription) String ¶
func (m MockSubscription) String() string
Return the full unique name for the subscription, in the format "projects/{project}/subscriptions/{subscription}"
type MockSubscriptionIterator ¶
type MockSubscriptionIterator struct { Subscriptions []ifaces_pubsub.Subscription // contains filtered or unexported fields }
func (*MockSubscriptionIterator) Next ¶
func (s *MockSubscriptionIterator) Next() (ifaces_pubsub.Subscription, error)
type MockTopicIterator ¶
type MockTopicIterator struct { ifaces_pubsub.TopicIterator // contains filtered or unexported fields }
func (*MockTopicIterator) Next ¶
func (s *MockTopicIterator) Next() (ifaces_pubsub.Topic, error)
Click to show internal directories.
Click to hide internal directories.