pubsub

package
v0.0.0-...-d56f328 Latest Latest
Warning

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

Go to latest
Published: May 21, 2015 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package pubsub provides access to the Google Cloud Pub/Sub API.

Usage example:

import "google.golang.org/api/pubsub/v1beta2"
...
pubsubService, err := pubsub.New(oauthHttpClient)

Index

Constants

View Source
const (
	// View and manage your data across Google Cloud Platform services
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"

	// View and manage Pub/Sub topics and subscriptions
	PubsubScope = "https://www.googleapis.com/auth/pubsub"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcknowledgeRequest

type AcknowledgeRequest struct {
	AckIds []string `json:"ackIds,omitempty"`
}

type Empty

type Empty struct {
}

type ListSubscriptionsResponse

type ListSubscriptionsResponse struct {
	NextPageToken string `json:"nextPageToken,omitempty"`

	Subscriptions []*Subscription `json:"subscriptions,omitempty"`
}

type ListTopicSubscriptionsResponse

type ListTopicSubscriptionsResponse struct {
	NextPageToken string `json:"nextPageToken,omitempty"`

	Subscriptions []string `json:"subscriptions,omitempty"`
}

type ListTopicsResponse

type ListTopicsResponse struct {
	NextPageToken string `json:"nextPageToken,omitempty"`

	Topics []*Topic `json:"topics,omitempty"`
}

type ModifyAckDeadlineRequest

type ModifyAckDeadlineRequest struct {
	AckDeadlineSeconds int64 `json:"ackDeadlineSeconds,omitempty"`

	AckId string `json:"ackId,omitempty"`
}

type ModifyPushConfigRequest

type ModifyPushConfigRequest struct {
	PushConfig *PushConfig `json:"pushConfig,omitempty"`
}

type ProjectsService

type ProjectsService struct {
	Subscriptions *ProjectsSubscriptionsService

	Topics *ProjectsTopicsService
	// contains filtered or unexported fields
}

func NewProjectsService

func NewProjectsService(s *Service) *ProjectsService

type ProjectsSubscriptionsAcknowledgeCall

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

func (*ProjectsSubscriptionsAcknowledgeCall) Do

func (*ProjectsSubscriptionsAcknowledgeCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsSubscriptionsCreateCall

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

func (*ProjectsSubscriptionsCreateCall) Do

func (*ProjectsSubscriptionsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsSubscriptionsDeleteCall

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

func (*ProjectsSubscriptionsDeleteCall) Do

func (*ProjectsSubscriptionsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsSubscriptionsGetCall

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

func (*ProjectsSubscriptionsGetCall) Do

func (*ProjectsSubscriptionsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsSubscriptionsListCall

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

func (*ProjectsSubscriptionsListCall) Do

func (*ProjectsSubscriptionsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ProjectsSubscriptionsListCall) PageSize

PageSize sets the optional parameter "pageSize":

func (*ProjectsSubscriptionsListCall) PageToken

PageToken sets the optional parameter "pageToken":

type ProjectsSubscriptionsModifyAckDeadlineCall

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

func (*ProjectsSubscriptionsModifyAckDeadlineCall) Do

func (*ProjectsSubscriptionsModifyAckDeadlineCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsSubscriptionsModifyPushConfigCall

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

func (*ProjectsSubscriptionsModifyPushConfigCall) Do

func (*ProjectsSubscriptionsModifyPushConfigCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsSubscriptionsPullCall

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

func (*ProjectsSubscriptionsPullCall) Do

func (*ProjectsSubscriptionsPullCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsSubscriptionsService

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

func NewProjectsSubscriptionsService

func NewProjectsSubscriptionsService(s *Service) *ProjectsSubscriptionsService

func (*ProjectsSubscriptionsService) Acknowledge

func (r *ProjectsSubscriptionsService) Acknowledge(subscription string, acknowledgerequest *AcknowledgeRequest) *ProjectsSubscriptionsAcknowledgeCall

Acknowledge: Acknowledges the messages associated with the ack tokens in the AcknowledgeRequest. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.

func (*ProjectsSubscriptionsService) Create

Create: Creates a subscription to a given topic for a given subscriber. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic.

func (*ProjectsSubscriptionsService) Delete

Delete: Deletes an existing subscription. All pending messages in the subscription are immediately dropped. Calls to Pull after deletion will return NOT_FOUND. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription, or its topic unless the same topic is specified.

func (*ProjectsSubscriptionsService) Get

Get: Gets the configuration details of a subscription.

func (*ProjectsSubscriptionsService) List

List: Lists matching subscriptions.

func (*ProjectsSubscriptionsService) ModifyAckDeadline

func (r *ProjectsSubscriptionsService) ModifyAckDeadline(subscription string, modifyackdeadlinerequest *ModifyAckDeadlineRequest) *ProjectsSubscriptionsModifyAckDeadlineCall

ModifyAckDeadline: Modifies the ack deadline for a specific message. This method is useful to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

func (*ProjectsSubscriptionsService) ModifyPushConfig

func (r *ProjectsSubscriptionsService) ModifyPushConfig(subscription string, modifypushconfigrequest *ModifyPushConfigRequest) *ProjectsSubscriptionsModifyPushConfigCall

ModifyPushConfig: Modifies the PushConfig for a specified subscription. This may be used to change a push subscription to a pull one (signified by an empty PushConfig) or vice versa, or change the endpoint URL and other attributes of a push subscription. Messages will accumulate for delivery continuously through the call regardless of changes to the PushConfig.

func (*ProjectsSubscriptionsService) Pull

Pull: Pulls messages from the server. Returns an empty list if there are no messages available in the backlog. The server may return UNAVAILABLE if there are too many concurrent pull requests pending for the given subscription.

type ProjectsTopicsCreateCall

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

func (*ProjectsTopicsCreateCall) Do

func (c *ProjectsTopicsCreateCall) Do() (*Topic, error)

func (*ProjectsTopicsCreateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsTopicsDeleteCall

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

func (*ProjectsTopicsDeleteCall) Do

func (c *ProjectsTopicsDeleteCall) Do() (*Empty, error)

func (*ProjectsTopicsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsTopicsGetCall

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

func (*ProjectsTopicsGetCall) Do

func (c *ProjectsTopicsGetCall) Do() (*Topic, error)

func (*ProjectsTopicsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsTopicsListCall

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

func (*ProjectsTopicsListCall) Do

func (*ProjectsTopicsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ProjectsTopicsListCall) PageSize

func (c *ProjectsTopicsListCall) PageSize(pageSize int64) *ProjectsTopicsListCall

PageSize sets the optional parameter "pageSize":

func (*ProjectsTopicsListCall) PageToken

func (c *ProjectsTopicsListCall) PageToken(pageToken string) *ProjectsTopicsListCall

PageToken sets the optional parameter "pageToken":

type ProjectsTopicsPublishCall

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

func (*ProjectsTopicsPublishCall) Do

func (*ProjectsTopicsPublishCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ProjectsTopicsService

type ProjectsTopicsService struct {
	Subscriptions *ProjectsTopicsSubscriptionsService
	// contains filtered or unexported fields
}

func NewProjectsTopicsService

func NewProjectsTopicsService(s *Service) *ProjectsTopicsService

func (*ProjectsTopicsService) Create

Create: Creates the given topic with the given name.

func (*ProjectsTopicsService) Delete

Delete: Deletes the topic with the given name. Returns NOT_FOUND if the topic does not exist. After a topic is deleted, a new topic may be created with the same name; this is an entirely new topic with none of the old configuration or subscriptions. Existing subscriptions to this topic are not deleted.

func (*ProjectsTopicsService) Get

Get: Gets the configuration of a topic.

func (*ProjectsTopicsService) List

List: Lists matching topics.

func (*ProjectsTopicsService) Publish

func (r *ProjectsTopicsService) Publish(topic string, publishrequest *PublishRequest) *ProjectsTopicsPublishCall

Publish: Adds one or more messages to the topic. Returns NOT_FOUND if the topic does not exist.

type ProjectsTopicsSubscriptionsListCall

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

func (*ProjectsTopicsSubscriptionsListCall) Do

func (*ProjectsTopicsSubscriptionsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ProjectsTopicsSubscriptionsListCall) PageSize

PageSize sets the optional parameter "pageSize":

func (*ProjectsTopicsSubscriptionsListCall) PageToken

PageToken sets the optional parameter "pageToken":

type ProjectsTopicsSubscriptionsService

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

func NewProjectsTopicsSubscriptionsService

func NewProjectsTopicsSubscriptionsService(s *Service) *ProjectsTopicsSubscriptionsService

func (*ProjectsTopicsSubscriptionsService) List

List: Lists the name of the subscriptions for this topic.

type PublishRequest

type PublishRequest struct {
	Messages []*PubsubMessage `json:"messages,omitempty"`
}

type PublishResponse

type PublishResponse struct {
	MessageIds []string `json:"messageIds,omitempty"`
}

type PubsubMessage

type PubsubMessage struct {
	Attributes map[string]string `json:"attributes,omitempty"`

	Data string `json:"data,omitempty"`

	MessageId string `json:"messageId,omitempty"`
}

type PullRequest

type PullRequest struct {
	MaxMessages int64 `json:"maxMessages,omitempty"`

	ReturnImmediately bool `json:"returnImmediately,omitempty"`
}

type PullResponse

type PullResponse struct {
	ReceivedMessages []*ReceivedMessage `json:"receivedMessages,omitempty"`
}

type PushConfig

type PushConfig struct {
	Attributes map[string]string `json:"attributes,omitempty"`

	PushEndpoint string `json:"pushEndpoint,omitempty"`
}

type ReceivedMessage

type ReceivedMessage struct {
	AckId string `json:"ackId,omitempty"`

	Message *PubsubMessage `json:"message,omitempty"`
}

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Projects *ProjectsService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type Subscription

type Subscription struct {
	AckDeadlineSeconds int64 `json:"ackDeadlineSeconds,omitempty"`

	Name string `json:"name,omitempty"`

	PushConfig *PushConfig `json:"pushConfig,omitempty"`

	Topic string `json:"topic,omitempty"`
}

type Topic

type Topic struct {
	Name string `json:"name,omitempty"`
}

Jump to

Keyboard shortcuts

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