infra

package
v0.0.0-...-0fc97c5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: MIT 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 interface {
	CreateTopic(ctx context.Context, id string) error
	Publish(ctx context.Context, id string, message []byte) error
	ListTopics(ctx context.Context) ([]string, error)
}

func NewClient

func NewClient(ctx context.Context, projectID string, opts ...option.ClientOption) (Client, error)

func NewFakeClient

func NewFakeClient(fakeHandler func(ctx context.Context, message *Message) error, topics ...string) Client

type Message

type Message struct {
	Data []byte `json:"data"`
}

Message represents data in Cloud Functions from Cloud PubSub

Directories

Path Synopsis
Code generated by pubsub generator DO NOT EDIT.
Code generated by pubsub generator DO NOT EDIT.
mock_task_gen
Package mock_task is a generated GoMock package.
Package mock_task is a generated GoMock package.

Jump to

Keyboard shortcuts

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