pubsubapi

package
v1.0.2003 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package pubsubapi is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	SubscriptionForTopic(ctx context.Context, message PubSubPushMessage) (event *manifest.EstafettePubSubEvent, err error)
	SubscribeToTopic(ctx context.Context, projectID, topicID string) (err error)
	SubscribeToPubsubTriggers(ctx context.Context, manifestString string) (err error)
}

Client is the interface for communicating with the pubsub apis

func NewClient

func NewClient(config *api.APIConfig, pubsubClient *stdpubsub.Client) Client

NewClient returns a new pubsub.Client

func NewLoggingClient

func NewLoggingClient(c Client) Client

NewLoggingClient returns a new instance of a logging Client.

func NewMetricsClient

func NewMetricsClient(c Client, requestCount metrics.Counter, requestLatency metrics.Histogram) Client

NewMetricsClient returns a new instance of a metrics Client.

func NewTracingClient

func NewTracingClient(c Client) Client

NewTracingClient returns a new instance of a tracing Client.

type MockClient

type MockClient struct {
	// contains filtered or unexported fields
}

MockClient is a mock of Client interface

func NewMockClient

func NewMockClient(ctrl *gomock.Controller) *MockClient

NewMockClient creates a new mock instance

func (*MockClient) EXPECT

func (m *MockClient) EXPECT() *MockClientMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockClient) SubscribeToPubsubTriggers

func (m *MockClient) SubscribeToPubsubTriggers(ctx context.Context, manifestString string) error

SubscribeToPubsubTriggers mocks base method

func (*MockClient) SubscribeToTopic

func (m *MockClient) SubscribeToTopic(ctx context.Context, projectID, topicID string) error

SubscribeToTopic mocks base method

func (*MockClient) SubscriptionForTopic

SubscriptionForTopic mocks base method

type MockClientMockRecorder

type MockClientMockRecorder struct {
	// contains filtered or unexported fields
}

MockClientMockRecorder is the mock recorder for MockClient

func (*MockClientMockRecorder) SubscribeToPubsubTriggers

func (mr *MockClientMockRecorder) SubscribeToPubsubTriggers(ctx, manifestString interface{}) *gomock.Call

SubscribeToPubsubTriggers indicates an expected call of SubscribeToPubsubTriggers

func (*MockClientMockRecorder) SubscribeToTopic

func (mr *MockClientMockRecorder) SubscribeToTopic(ctx, projectID, topicID interface{}) *gomock.Call

SubscribeToTopic indicates an expected call of SubscribeToTopic

func (*MockClientMockRecorder) SubscriptionForTopic

func (mr *MockClientMockRecorder) SubscriptionForTopic(ctx, message interface{}) *gomock.Call

SubscriptionForTopic indicates an expected call of SubscriptionForTopic

type PubSubPushMessage

type PubSubPushMessage struct {
	Message      manifest.PubsubMessage `json:"message,omitempty"`
	Subscription string                 `json:"subscription,omitempty"`
}

PubSubPushMessage is a container for a pubsub push message

func (PubSubPushMessage) GetDecodedData

func (m PubSubPushMessage) GetDecodedData() string

GetDecodedData returns the base64 decoded data

func (PubSubPushMessage) GetProject

func (m PubSubPushMessage) GetProject() string

GetProject returns the project id for the pubsub subscription

func (PubSubPushMessage) GetSubscription

func (m PubSubPushMessage) GetSubscription() string

GetSubscription returns the subscription name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL