mocks

package
v0.0.0-...-2ad2f98 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func NewClient

func NewClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *Client

NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Client) Close

func (_m *Client) Close() error

Close provides a mock function with given fields:

func (*Client) CreateSubscription

func (_m *Client) CreateSubscription(ctx context.Context, id string, cfg gopubsub.SubscriptionConfig) (pubsub.Subscription, error)

CreateSubscription provides a mock function with given fields: ctx, id, cfg

func (*Client) CreateTopic

func (_m *Client) CreateTopic(ctx context.Context, topicID string) (pubsub.Topic, error)

CreateTopic provides a mock function with given fields: ctx, topicID

func (*Client) CreateTopicWithConfig

func (_m *Client) CreateTopicWithConfig(ctx context.Context, topicID string, tc *gopubsub.TopicConfig) (pubsub.Topic, error)

CreateTopicWithConfig provides a mock function with given fields: ctx, topicID, tc

func (*Client) DetachSubscription

func (_m *Client) DetachSubscription(ctx context.Context, sub string) (*gopubsub.DetachSubscriptionResult, error)

DetachSubscription provides a mock function with given fields: ctx, sub

func (*Client) Project

func (_m *Client) Project() string

Project provides a mock function with given fields:

func (*Client) Snapshot

func (_m *Client) Snapshot(id string) pubsub.Snapshot

Snapshot provides a mock function with given fields: id

func (*Client) Snapshots

Snapshots provides a mock function with given fields: ctx

func (*Client) Subscription

func (_m *Client) Subscription(id string) pubsub.Subscription

Subscription provides a mock function with given fields: id

func (*Client) SubscriptionInProject

func (_m *Client) SubscriptionInProject(id string, projectID string) pubsub.Subscription

SubscriptionInProject provides a mock function with given fields: id, projectID

func (*Client) Subscriptions

func (_m *Client) Subscriptions(ctx context.Context) *gopubsub.SubscriptionIterator

Subscriptions provides a mock function with given fields: ctx

func (*Client) Topic

func (_m *Client) Topic(id string) pubsub.Topic

Topic provides a mock function with given fields: id

func (*Client) TopicInProject

func (_m *Client) TopicInProject(id string, projectID string) pubsub.Topic

TopicInProject provides a mock function with given fields: id, projectID

func (*Client) Topics

func (_m *Client) Topics(ctx context.Context) *gopubsub.TopicIterator

Topics provides a mock function with given fields: ctx

type PublishResult

type PublishResult struct {
	mock.Mock
}

PublishResult is an autogenerated mock type for the PublishResult type

func NewPublishResult

func NewPublishResult(t interface {
	mock.TestingT
	Cleanup(func())
}) *PublishResult

NewPublishResult creates a new instance of PublishResult. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*PublishResult) Get

func (_m *PublishResult) Get(ctx context.Context) (string, error)

Get provides a mock function with given fields: ctx

func (*PublishResult) Ready

func (_m *PublishResult) Ready() <-chan struct{}

Ready provides a mock function with given fields:

type Snapshot

type Snapshot struct {
	mock.Mock
}

Snapshot is an autogenerated mock type for the Snapshot type

func NewSnapshot

func NewSnapshot(t interface {
	mock.TestingT
	Cleanup(func())
}) *Snapshot

NewSnapshot creates a new instance of Snapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Snapshot) Delete

func (_m *Snapshot) Delete(ctx context.Context) error

Delete provides a mock function with given fields: ctx

func (*Snapshot) ID

func (_m *Snapshot) ID() string

ID provides a mock function with given fields:

func (*Snapshot) SetLabels

func (_m *Snapshot) SetLabels(ctx context.Context, label map[string]string) (*gopubsub.SnapshotConfig, error)

SetLabels provides a mock function with given fields: ctx, label

type Subscription

type Subscription struct {
	mock.Mock
}

Subscription is an autogenerated mock type for the Subscription type

func NewSubscription

func NewSubscription(t interface {
	mock.TestingT
	Cleanup(func())
}) *Subscription

NewSubscription creates a new instance of Subscription. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Subscription) Config

Config provides a mock function with given fields: ctx

func (*Subscription) CreateSnapshot

func (_m *Subscription) CreateSnapshot(ctx context.Context, name string) (*pubsub.SnapshotConfig, error)

CreateSnapshot provides a mock function with given fields: ctx, name

func (*Subscription) Delete

func (_m *Subscription) Delete(ctx context.Context) error

Delete provides a mock function with given fields: ctx

func (*Subscription) Exists

func (_m *Subscription) Exists(ctx context.Context) (bool, error)

Exists provides a mock function with given fields: ctx

func (*Subscription) IAM

func (_m *Subscription) IAM() *iam.Handle

IAM provides a mock function with given fields:

func (*Subscription) ID

func (_m *Subscription) ID() string

ID provides a mock function with given fields:

func (*Subscription) Receive

func (_m *Subscription) Receive(ctx context.Context, f func(context.Context, *pubsub.Message)) error

Receive provides a mock function with given fields: ctx, f

func (*Subscription) SeekToSnapshot

func (_m *Subscription) SeekToSnapshot(ctx context.Context, snap gopubsub.Snapshot) error

SeekToSnapshot provides a mock function with given fields: ctx, snap

func (*Subscription) SeekToTime

func (_m *Subscription) SeekToTime(ctx context.Context, t time.Time) error

SeekToTime provides a mock function with given fields: ctx, t

func (*Subscription) String

func (_m *Subscription) String() string

String provides a mock function with given fields:

func (*Subscription) Update

Update provides a mock function with given fields: ctx, cfg

type Topic

type Topic struct {
	mock.Mock
}

Topic is an autogenerated mock type for the Topic type

func NewTopic

func NewTopic(t interface {
	mock.TestingT
	Cleanup(func())
}) *Topic

NewTopic creates a new instance of Topic. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Topic) Config

func (_m *Topic) Config(ctx context.Context) (pubsub.TopicConfig, error)

Config provides a mock function with given fields: ctx

func (*Topic) Delete

func (_m *Topic) Delete(ctx context.Context) error

Delete provides a mock function with given fields: ctx

func (*Topic) Exists

func (_m *Topic) Exists(ctx context.Context) (bool, error)

Exists provides a mock function with given fields: ctx

func (*Topic) Flush

func (_m *Topic) Flush()

Flush provides a mock function with given fields:

func (*Topic) IAM

func (_m *Topic) IAM() *iam.Handle

IAM provides a mock function with given fields:

func (*Topic) ID

func (_m *Topic) ID() string

ID provides a mock function with given fields:

func (*Topic) Publish

func (_m *Topic) Publish(ctx context.Context, msg *pubsub.Message) gopubsub.PublishResult

Publish provides a mock function with given fields: ctx, msg

func (*Topic) ResumePublish

func (_m *Topic) ResumePublish(orderingKey string)

ResumePublish provides a mock function with given fields: orderingKey

func (*Topic) Stop

func (_m *Topic) Stop()

Stop provides a mock function with given fields:

func (*Topic) String

func (_m *Topic) String() string

String provides a mock function with given fields:

func (*Topic) Subscriptions

func (_m *Topic) Subscriptions(ctx context.Context) *pubsub.SubscriptionIterator

Subscriptions provides a mock function with given fields: ctx

func (*Topic) Update

Update provides a mock function with given fields: ctx, cfg

Jump to

Keyboard shortcuts

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