pubsublite

package
v0.48.1-0...-67a0a95 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package pubsublite provides access to the Pub/Sub Lite API.

For product documentation, see: https://cloud.google.com/pubsub/lite/docs

Creating a client

Usage example:

import "google.golang.org/api/pubsublite/v1"
...
ctx := context.Background()
pubsubliteService, err := pubsublite.NewService(ctx)

In this example, Google Application Default Credentials are used for authentication.

For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.

Other authentication options

To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:

pubsubliteService, err := pubsublite.NewService(ctx, option.WithAPIKey("AIza..."))

To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:

config := &oauth2.Config{...}
// ...
token, err := config.Exchange(ctx, ...)
pubsubliteService, err := pubsublite.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))

See https://godoc.org/google.golang.org/api/option/ for details on options.

Index

Constants

View Source
const (
	// See, edit, configure, and delete your Google Cloud Platform data
	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminProjectsLocationsService

type AdminProjectsLocationsService struct {
	Subscriptions *AdminProjectsLocationsSubscriptionsService

	Topics *AdminProjectsLocationsTopicsService
	// contains filtered or unexported fields
}

func NewAdminProjectsLocationsService

func NewAdminProjectsLocationsService(s *Service) *AdminProjectsLocationsService

type AdminProjectsLocationsSubscriptionsCreateCall

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

func (*AdminProjectsLocationsSubscriptionsCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsSubscriptionsCreateCall) Do

Do executes the "pubsublite.admin.projects.locations.subscriptions.create" call. Exactly one of *Subscription or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Subscription.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsSubscriptionsCreateCall) Fields

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

func (*AdminProjectsLocationsSubscriptionsCreateCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AdminProjectsLocationsSubscriptionsCreateCall) SkipBacklog

SkipBacklog sets the optional parameter "skipBacklog": If true, the newly created subscription will only receive messages published after the subscription was created. Otherwise, the entire message backlog will be received on the subscription. Defaults to false.

func (*AdminProjectsLocationsSubscriptionsCreateCall) SubscriptionId

SubscriptionId sets the optional parameter "subscriptionId": Required. The ID to use for the subscription, which will become the final component of the subscription's name. This value is structured like: `my-sub-name`.

type AdminProjectsLocationsSubscriptionsDeleteCall

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

func (*AdminProjectsLocationsSubscriptionsDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsSubscriptionsDeleteCall) Do

Do executes the "pubsublite.admin.projects.locations.subscriptions.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsSubscriptionsDeleteCall) Fields

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

func (*AdminProjectsLocationsSubscriptionsDeleteCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type AdminProjectsLocationsSubscriptionsGetCall

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

func (*AdminProjectsLocationsSubscriptionsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsSubscriptionsGetCall) Do

Do executes the "pubsublite.admin.projects.locations.subscriptions.get" call. Exactly one of *Subscription or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Subscription.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsSubscriptionsGetCall) Fields

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

func (*AdminProjectsLocationsSubscriptionsGetCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AdminProjectsLocationsSubscriptionsGetCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AdminProjectsLocationsSubscriptionsListCall

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

func (*AdminProjectsLocationsSubscriptionsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsSubscriptionsListCall) Do

Do executes the "pubsublite.admin.projects.locations.subscriptions.list" call. Exactly one of *ListSubscriptionsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListSubscriptionsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsSubscriptionsListCall) Fields

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

func (*AdminProjectsLocationsSubscriptionsListCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AdminProjectsLocationsSubscriptionsListCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AdminProjectsLocationsSubscriptionsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of subscriptions to return. The service may return fewer than this value. If unset or zero, all subscriptions for the parent will be returned.

func (*AdminProjectsLocationsSubscriptionsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListSubscriptions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListSubscriptions` must match the call that provided the page token.

func (*AdminProjectsLocationsSubscriptionsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type AdminProjectsLocationsSubscriptionsPatchCall

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

func (*AdminProjectsLocationsSubscriptionsPatchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsSubscriptionsPatchCall) Do

Do executes the "pubsublite.admin.projects.locations.subscriptions.patch" call. Exactly one of *Subscription or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Subscription.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsSubscriptionsPatchCall) Fields

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

func (*AdminProjectsLocationsSubscriptionsPatchCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AdminProjectsLocationsSubscriptionsPatchCall) UpdateMask

UpdateMask sets the optional parameter "updateMask": Required. A mask specifying the subscription fields to change.

type AdminProjectsLocationsSubscriptionsService

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

func NewAdminProjectsLocationsSubscriptionsService

func NewAdminProjectsLocationsSubscriptionsService(s *Service) *AdminProjectsLocationsSubscriptionsService

func (*AdminProjectsLocationsSubscriptionsService) Create

Create: Creates a new subscription.

  • parent: The parent location in which to create the subscription. Structured like `projects/{project_number}/locations/{location}`.

func (*AdminProjectsLocationsSubscriptionsService) Delete

Delete: Deletes the specified subscription.

- name: The name of the subscription to delete.

func (*AdminProjectsLocationsSubscriptionsService) Get

Get: Returns the subscription configuration.

- name: The name of the subscription whose configuration to return.

func (*AdminProjectsLocationsSubscriptionsService) List

List: Returns the list of subscriptions for the given project.

  • parent: The parent whose subscriptions are to be listed. Structured like `projects/{project_number}/locations/{location}`.

func (*AdminProjectsLocationsSubscriptionsService) Patch

Patch: Updates properties of the specified subscription.

  • name: The name of the subscription. Structured like: projects/{project_number}/locations/{location}/subscriptions/{subscr iption_id}.

type AdminProjectsLocationsTopicsCreateCall

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

func (*AdminProjectsLocationsTopicsCreateCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsTopicsCreateCall) Do

Do executes the "pubsublite.admin.projects.locations.topics.create" call. Exactly one of *Topic or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Topic.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsTopicsCreateCall) Fields

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

func (*AdminProjectsLocationsTopicsCreateCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AdminProjectsLocationsTopicsCreateCall) TopicId

TopicId sets the optional parameter "topicId": Required. The ID to use for the topic, which will become the final component of the topic's name. This value is structured like: `my-topic-name`.

type AdminProjectsLocationsTopicsDeleteCall

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

func (*AdminProjectsLocationsTopicsDeleteCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsTopicsDeleteCall) Do

Do executes the "pubsublite.admin.projects.locations.topics.delete" call. Exactly one of *Empty or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Empty.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsTopicsDeleteCall) Fields

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

func (*AdminProjectsLocationsTopicsDeleteCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type AdminProjectsLocationsTopicsGetCall

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

func (*AdminProjectsLocationsTopicsGetCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsTopicsGetCall) Do

Do executes the "pubsublite.admin.projects.locations.topics.get" call. Exactly one of *Topic or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Topic.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsTopicsGetCall) Fields

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

func (*AdminProjectsLocationsTopicsGetCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AdminProjectsLocationsTopicsGetCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AdminProjectsLocationsTopicsGetPartitionsCall

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

func (*AdminProjectsLocationsTopicsGetPartitionsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsTopicsGetPartitionsCall) Do

Do executes the "pubsublite.admin.projects.locations.topics.getPartitions" call. Exactly one of *TopicPartitions or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *TopicPartitions.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsTopicsGetPartitionsCall) Fields

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

func (*AdminProjectsLocationsTopicsGetPartitionsCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AdminProjectsLocationsTopicsGetPartitionsCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

type AdminProjectsLocationsTopicsListCall

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

func (*AdminProjectsLocationsTopicsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsTopicsListCall) Do

Do executes the "pubsublite.admin.projects.locations.topics.list" call. Exactly one of *ListTopicsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListTopicsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsTopicsListCall) Fields

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

func (*AdminProjectsLocationsTopicsListCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AdminProjectsLocationsTopicsListCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AdminProjectsLocationsTopicsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of topics to return. The service may return fewer than this value. If unset or zero, all topics for the parent will be returned.

func (*AdminProjectsLocationsTopicsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListTopics` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTopics` must match the call that provided the page token.

func (*AdminProjectsLocationsTopicsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type AdminProjectsLocationsTopicsPatchCall

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

func (*AdminProjectsLocationsTopicsPatchCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsTopicsPatchCall) Do

Do executes the "pubsublite.admin.projects.locations.topics.patch" call. Exactly one of *Topic or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *Topic.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsTopicsPatchCall) Fields

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

func (*AdminProjectsLocationsTopicsPatchCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AdminProjectsLocationsTopicsPatchCall) UpdateMask

UpdateMask sets the optional parameter "updateMask": Required. A mask specifying the topic fields to change.

type AdminProjectsLocationsTopicsService

type AdminProjectsLocationsTopicsService struct {
	Subscriptions *AdminProjectsLocationsTopicsSubscriptionsService
	// contains filtered or unexported fields
}

func NewAdminProjectsLocationsTopicsService

func NewAdminProjectsLocationsTopicsService(s *Service) *AdminProjectsLocationsTopicsService

func (*AdminProjectsLocationsTopicsService) Create

Create: Creates a new topic.

  • parent: The parent location in which to create the topic. Structured like `projects/{project_number}/locations/{location}`.

func (*AdminProjectsLocationsTopicsService) Delete

Delete: Deletes the specified topic.

- name: The name of the topic to delete.

func (*AdminProjectsLocationsTopicsService) Get

Get: Returns the topic configuration.

- name: The name of the topic whose configuration to return.

func (*AdminProjectsLocationsTopicsService) GetPartitions

GetPartitions: Returns the partition information for the requested topic.

- name: The topic whose partition information to return.

func (*AdminProjectsLocationsTopicsService) List

List: Returns the list of topics for the given project.

  • parent: The parent whose topics are to be listed. Structured like `projects/{project_number}/locations/{location}`.

func (*AdminProjectsLocationsTopicsService) Patch

Patch: Updates properties of the specified topic.

  • name: The name of the topic. Structured like: projects/{project_number}/locations/{location}/topics/{topic_id}.

type AdminProjectsLocationsTopicsSubscriptionsListCall

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

func (*AdminProjectsLocationsTopicsSubscriptionsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*AdminProjectsLocationsTopicsSubscriptionsListCall) Do

Do executes the "pubsublite.admin.projects.locations.topics.subscriptions.list" call. Exactly one of *ListTopicSubscriptionsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListTopicSubscriptionsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*AdminProjectsLocationsTopicsSubscriptionsListCall) Fields

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

func (*AdminProjectsLocationsTopicsSubscriptionsListCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*AdminProjectsLocationsTopicsSubscriptionsListCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*AdminProjectsLocationsTopicsSubscriptionsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of subscriptions to return. The service may return fewer than this value. If unset or zero, all subscriptions for the given topic will be returned.

func (*AdminProjectsLocationsTopicsSubscriptionsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListTopicSubscriptions` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListTopicSubscriptions` must match the call that provided the page token.

func (*AdminProjectsLocationsTopicsSubscriptionsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type AdminProjectsLocationsTopicsSubscriptionsService

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

func NewAdminProjectsLocationsTopicsSubscriptionsService

func NewAdminProjectsLocationsTopicsSubscriptionsService(s *Service) *AdminProjectsLocationsTopicsSubscriptionsService

func (*AdminProjectsLocationsTopicsSubscriptionsService) List

List: Lists the subscriptions attached to the specified topic.

- name: The name of the topic whose subscriptions to list.

type AdminProjectsService

type AdminProjectsService struct {
	Locations *AdminProjectsLocationsService
	// contains filtered or unexported fields
}

func NewAdminProjectsService

func NewAdminProjectsService(s *Service) *AdminProjectsService

type AdminService

type AdminService struct {
	Projects *AdminProjectsService
	// contains filtered or unexported fields
}

func NewAdminService

func NewAdminService(s *Service) *AdminService

type Capacity

type Capacity struct {
	// PublishMibPerSec: Publish throughput capacity per partition in MiB/s.
	// Must be >= 4 and <= 16.
	PublishMibPerSec int64 `json:"publishMibPerSec,omitempty"`

	// SubscribeMibPerSec: Subscribe throughput capacity per partition in
	// MiB/s. Must be >= 4 and <= 32.
	SubscribeMibPerSec int64 `json:"subscribeMibPerSec,omitempty"`

	// ForceSendFields is a list of field names (e.g. "PublishMibPerSec") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "PublishMibPerSec") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

Capacity: The throughput capacity configuration for each partition.

func (*Capacity) MarshalJSON

func (s *Capacity) MarshalJSON() ([]byte, error)

type CommitCursorRequest

type CommitCursorRequest struct {
	// Cursor: The new value for the committed cursor.
	Cursor *Cursor `json:"cursor,omitempty"`

	// Partition: The partition for which to update the cursor. Partitions
	// are zero indexed, so `partition` must be in the range [0,
	// topic.num_partitions).
	Partition int64 `json:"partition,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "Cursor") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Cursor") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

CommitCursorRequest: Request for CommitCursor.

func (*CommitCursorRequest) MarshalJSON

func (s *CommitCursorRequest) MarshalJSON() ([]byte, error)

type CommitCursorResponse

type CommitCursorResponse struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

CommitCursorResponse: Response for CommitCursor.

type ComputeHeadCursorRequest

type ComputeHeadCursorRequest struct {
	// Partition: Required. The partition for which we should compute the
	// head cursor.
	Partition int64 `json:"partition,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "Partition") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Partition") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ComputeHeadCursorRequest: Compute the current head cursor for a partition.

func (*ComputeHeadCursorRequest) MarshalJSON

func (s *ComputeHeadCursorRequest) MarshalJSON() ([]byte, error)

type ComputeHeadCursorResponse

type ComputeHeadCursorResponse struct {
	// HeadCursor: The head cursor.
	HeadCursor *Cursor `json:"headCursor,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "HeadCursor") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "HeadCursor") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ComputeHeadCursorResponse: Response containing the head cursor for the requested topic and partition.

func (*ComputeHeadCursorResponse) MarshalJSON

func (s *ComputeHeadCursorResponse) MarshalJSON() ([]byte, error)

type ComputeMessageStatsRequest

type ComputeMessageStatsRequest struct {
	// EndCursor: The exclusive end of the range. The range is empty if
	// end_cursor <= start_cursor. Specifying a start_cursor before the
	// first message and an end_cursor after the last message will retrieve
	// all messages.
	EndCursor *Cursor `json:"endCursor,omitempty"`

	// Partition: Required. The partition for which we should compute
	// message stats.
	Partition int64 `json:"partition,omitempty,string"`

	// StartCursor: The inclusive start of the range.
	StartCursor *Cursor `json:"startCursor,omitempty"`

	// ForceSendFields is a list of field names (e.g. "EndCursor") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "EndCursor") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ComputeMessageStatsRequest: Compute statistics about a range of messages in a given topic and partition.

func (*ComputeMessageStatsRequest) MarshalJSON

func (s *ComputeMessageStatsRequest) MarshalJSON() ([]byte, error)

type ComputeMessageStatsResponse

type ComputeMessageStatsResponse struct {
	// MessageBytes: The number of quota bytes accounted to these messages.
	MessageBytes int64 `json:"messageBytes,omitempty,string"`

	// MessageCount: The count of messages.
	MessageCount int64 `json:"messageCount,omitempty,string"`

	// MinimumEventTime: The minimum event timestamp across these messages.
	// For the purposes of this computation, if a message does not have an
	// event time, we use the publish time. The timestamp will be unset if
	// there are no messages.
	MinimumEventTime string `json:"minimumEventTime,omitempty"`

	// MinimumPublishTime: The minimum publish timestamp across these
	// messages. Note that publish timestamps within a partition are not
	// guaranteed to be non-decreasing. The timestamp will be unset if there
	// are no messages.
	MinimumPublishTime string `json:"minimumPublishTime,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "MessageBytes") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "MessageBytes") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ComputeMessageStatsResponse: Response containing stats for messages in the requested topic and partition.

func (*ComputeMessageStatsResponse) MarshalJSON

func (s *ComputeMessageStatsResponse) MarshalJSON() ([]byte, error)

type ComputeTimeCursorRequest

type ComputeTimeCursorRequest struct {
	// Partition: Required. The partition for which we should compute the
	// cursor.
	Partition int64 `json:"partition,omitempty,string"`

	// Target: Required. The target publish or event time. Specifying a
	// future time will return an unset cursor.
	Target *TimeTarget `json:"target,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Partition") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Partition") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ComputeTimeCursorRequest: Compute the corresponding cursor for a publish or event time in a topic partition.

func (*ComputeTimeCursorRequest) MarshalJSON

func (s *ComputeTimeCursorRequest) MarshalJSON() ([]byte, error)

type ComputeTimeCursorResponse

type ComputeTimeCursorResponse struct {
	// Cursor: If present, the cursor references the first message with time
	// greater than or equal to the specified target time. If such a message
	// cannot be found, the cursor will be unset (i.e. `cursor` is not
	// present).
	Cursor *Cursor `json:"cursor,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Cursor") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Cursor") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ComputeTimeCursorResponse: Response containing the cursor corresponding to a publish or event time in a topic partition.

func (*ComputeTimeCursorResponse) MarshalJSON

func (s *ComputeTimeCursorResponse) MarshalJSON() ([]byte, error)

type Cursor

type Cursor struct {
	// Offset: The offset of a message within a topic partition. Must be
	// greater than or equal 0.
	Offset int64 `json:"offset,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "Offset") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Offset") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Cursor: A cursor that describes the position of a message within a topic partition.

func (*Cursor) MarshalJSON

func (s *Cursor) MarshalJSON() ([]byte, error)

type CursorProjectsLocationsService

type CursorProjectsLocationsService struct {
	Subscriptions *CursorProjectsLocationsSubscriptionsService
	// contains filtered or unexported fields
}

func NewCursorProjectsLocationsService

func NewCursorProjectsLocationsService(s *Service) *CursorProjectsLocationsService

type CursorProjectsLocationsSubscriptionsCommitCursorCall

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

func (*CursorProjectsLocationsSubscriptionsCommitCursorCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CursorProjectsLocationsSubscriptionsCommitCursorCall) Do

Do executes the "pubsublite.cursor.projects.locations.subscriptions.commitCursor" call. Exactly one of *CommitCursorResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *CommitCursorResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CursorProjectsLocationsSubscriptionsCommitCursorCall) Fields

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

func (*CursorProjectsLocationsSubscriptionsCommitCursorCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type CursorProjectsLocationsSubscriptionsCursorsListCall

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

func (*CursorProjectsLocationsSubscriptionsCursorsListCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*CursorProjectsLocationsSubscriptionsCursorsListCall) Do

Do executes the "pubsublite.cursor.projects.locations.subscriptions.cursors.list" call. Exactly one of *ListPartitionCursorsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ListPartitionCursorsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*CursorProjectsLocationsSubscriptionsCursorsListCall) Fields

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

func (*CursorProjectsLocationsSubscriptionsCursorsListCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

func (*CursorProjectsLocationsSubscriptionsCursorsListCall) IfNoneMatch

IfNoneMatch sets the optional parameter which makes the operation fail if the object's ETag matches the given value. This is useful for getting updates only after the object has changed since the last request. Use googleapi.IsNotModified to check whether the response error from Do is the result of In-None-Match.

func (*CursorProjectsLocationsSubscriptionsCursorsListCall) PageSize

PageSize sets the optional parameter "pageSize": The maximum number of cursors to return. The service may return fewer than this value. If unset or zero, all cursors for the parent will be returned.

func (*CursorProjectsLocationsSubscriptionsCursorsListCall) PageToken

PageToken sets the optional parameter "pageToken": A page token, received from a previous `ListPartitionCursors` call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to `ListPartitionCursors` must match the call that provided the page token.

func (*CursorProjectsLocationsSubscriptionsCursorsListCall) Pages

Pages invokes f for each page of results. A non-nil error returned from f will halt the iteration. The provided context supersedes any context provided to the Context method.

type CursorProjectsLocationsSubscriptionsCursorsService

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

func (*CursorProjectsLocationsSubscriptionsCursorsService) List

List: Returns all committed cursor information for a subscription.

  • parent: The subscription for which to retrieve cursors. Structured like `projects/{project_number}/locations/{location}/subscriptions/{subsc ription_id}`.

type CursorProjectsLocationsSubscriptionsService

type CursorProjectsLocationsSubscriptionsService struct {
	Cursors *CursorProjectsLocationsSubscriptionsCursorsService
	// contains filtered or unexported fields
}

func NewCursorProjectsLocationsSubscriptionsService

func NewCursorProjectsLocationsSubscriptionsService(s *Service) *CursorProjectsLocationsSubscriptionsService

func (*CursorProjectsLocationsSubscriptionsService) CommitCursor

CommitCursor: Updates the committed cursor.

- subscription: The subscription for which to update the cursor.

type CursorProjectsService

type CursorProjectsService struct {
	Locations *CursorProjectsLocationsService
	// contains filtered or unexported fields
}

func NewCursorProjectsService

func NewCursorProjectsService(s *Service) *CursorProjectsService

type CursorService

type CursorService struct {
	Projects *CursorProjectsService
	// contains filtered or unexported fields
}

func NewCursorService

func NewCursorService(s *Service) *CursorService

type DeliveryConfig

type DeliveryConfig struct {
	// DeliveryRequirement: The DeliveryRequirement for this subscription.
	//
	// Possible values:
	//   "DELIVERY_REQUIREMENT_UNSPECIFIED" - Default value. This value is
	// unused.
	//   "DELIVER_IMMEDIATELY" - The server does not wait for a published
	// message to be successfully written to storage before delivering it to
	// subscribers.
	//   "DELIVER_AFTER_STORED" - The server will not deliver a published
	// message to subscribers until the message has been successfully
	// written to storage. This will result in higher end-to-end latency,
	// but consistent delivery.
	DeliveryRequirement string `json:"deliveryRequirement,omitempty"`

	// ForceSendFields is a list of field names (e.g. "DeliveryRequirement")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DeliveryRequirement") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

DeliveryConfig: The settings for a subscription's message delivery.

func (*DeliveryConfig) MarshalJSON

func (s *DeliveryConfig) MarshalJSON() ([]byte, error)

type Empty

type Empty struct {
	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`
}

Empty: A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.

type ListPartitionCursorsResponse

type ListPartitionCursorsResponse struct {
	// NextPageToken: A token, which can be sent as `page_token` to retrieve
	// the next page. If this field is omitted, there are no subsequent
	// pages.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// PartitionCursors: The partition cursors from this request.
	PartitionCursors []*PartitionCursor `json:"partitionCursors,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListPartitionCursorsResponse: Response for ListPartitionCursors

func (*ListPartitionCursorsResponse) MarshalJSON

func (s *ListPartitionCursorsResponse) MarshalJSON() ([]byte, error)

type ListSubscriptionsResponse

type ListSubscriptionsResponse struct {
	// NextPageToken: A token that can be sent as `page_token` to retrieve
	// the next page of results. If this field is omitted, there are no more
	// results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Subscriptions: The list of subscriptions in the requested parent. The
	// order of the subscriptions is unspecified.
	Subscriptions []*Subscription `json:"subscriptions,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListSubscriptionsResponse: Response for ListSubscriptions.

func (*ListSubscriptionsResponse) MarshalJSON

func (s *ListSubscriptionsResponse) MarshalJSON() ([]byte, error)

type ListTopicSubscriptionsResponse

type ListTopicSubscriptionsResponse struct {
	// NextPageToken: A token that can be sent as `page_token` to retrieve
	// the next page of results. If this field is omitted, there are no more
	// results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Subscriptions: The names of subscriptions attached to the topic. The
	// order of the subscriptions is unspecified.
	Subscriptions []string `json:"subscriptions,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListTopicSubscriptionsResponse: Response for ListTopicSubscriptions.

func (*ListTopicSubscriptionsResponse) MarshalJSON

func (s *ListTopicSubscriptionsResponse) MarshalJSON() ([]byte, error)

type ListTopicsResponse

type ListTopicsResponse struct {
	// NextPageToken: A token that can be sent as `page_token` to retrieve
	// the next page of results. If this field is omitted, there are no more
	// results.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// Topics: The list of topic in the requested parent. The order of the
	// topics is unspecified.
	Topics []*Topic `json:"topics,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "NextPageToken") to include
	// in API requests with the JSON null value. By default, fields with
	// empty values are omitted from API requests. However, any field with
	// an empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

ListTopicsResponse: Response for ListTopics.

func (*ListTopicsResponse) MarshalJSON

func (s *ListTopicsResponse) MarshalJSON() ([]byte, error)

type PartitionConfig

type PartitionConfig struct {
	// Capacity: The capacity configuration.
	Capacity *Capacity `json:"capacity,omitempty"`

	// Count: The number of partitions in the topic. Must be at least 1.
	// Once a topic has been created the number of partitions can be
	// increased but not decreased. Message ordering is not guaranteed
	// across a topic resize. For more information see
	// https://cloud.google.com/pubsub/lite/docs/topics#scaling_capacity
	Count int64 `json:"count,omitempty,string"`

	// Scale: DEPRECATED: Use capacity instead which can express a superset
	// of configurations. Every partition in the topic is allocated
	// throughput equivalent to `scale` times the standard partition
	// throughput (4 MiB/s). This is also reflected in the cost of this
	// topic; a topic with `scale` of 2 and count of 10 is charged for 20
	// partitions. This value must be in the range [1,4].
	Scale int64 `json:"scale,omitempty"`

	// ForceSendFields is a list of field names (e.g. "Capacity") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Capacity") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

PartitionConfig: The settings for a topic's partitions.

func (*PartitionConfig) MarshalJSON

func (s *PartitionConfig) MarshalJSON() ([]byte, error)

type PartitionCursor

type PartitionCursor struct {
	// Cursor: The value of the cursor.
	Cursor *Cursor `json:"cursor,omitempty"`

	// Partition: The partition this is for.
	Partition int64 `json:"partition,omitempty,string"`

	// ForceSendFields is a list of field names (e.g. "Cursor") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Cursor") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

PartitionCursor: A pair of a Cursor and the partition it is for.

func (*PartitionCursor) MarshalJSON

func (s *PartitionCursor) MarshalJSON() ([]byte, error)

type RetentionConfig

type RetentionConfig struct {
	// PerPartitionBytes: The provisioned storage, in bytes, per partition.
	// If the number of bytes stored in any of the topic's partitions grows
	// beyond this value, older messages will be dropped to make room for
	// newer ones, regardless of the value of `period`.
	PerPartitionBytes int64 `json:"perPartitionBytes,omitempty,string"`

	// Period: How long a published message is retained. If unset, messages
	// will be retained as long as the bytes retained for each partition is
	// below `per_partition_bytes`.
	Period string `json:"period,omitempty"`

	// ForceSendFields is a list of field names (e.g. "PerPartitionBytes")
	// to unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "PerPartitionBytes") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

RetentionConfig: The settings for a topic's message retention.

func (*RetentionConfig) MarshalJSON

func (s *RetentionConfig) MarshalJSON() ([]byte, error)

type Service

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

	Admin *AdminService

	Cursor *CursorService

	TopicStats *TopicStatsService
	// contains filtered or unexported fields
}

func New deprecated

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

New creates a new Service. It uses the provided http.Client for requests.

Deprecated: please use NewService instead. To provide a custom HTTP client, use option.WithHTTPClient. If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.

func NewService

func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error)

NewService creates a new Service.

type Subscription

type Subscription struct {
	// DeliveryConfig: The settings for this subscription's message
	// delivery.
	DeliveryConfig *DeliveryConfig `json:"deliveryConfig,omitempty"`

	// Name: The name of the subscription. Structured like:
	// projects/{project_number}/locations/{location}/subscriptions/{subscrip
	// tion_id}
	Name string `json:"name,omitempty"`

	// Topic: The name of the topic this subscription is attached to.
	// Structured like:
	// projects/{project_number}/locations/{location}/topics/{topic_id}
	Topic string `json:"topic,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "DeliveryConfig") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "DeliveryConfig") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

Subscription: Metadata about a subscription resource.

func (*Subscription) MarshalJSON

func (s *Subscription) MarshalJSON() ([]byte, error)

type TimeTarget

type TimeTarget struct {
	// EventTime: Request the cursor of the first message with event time
	// greater than or equal to `event_time`. If messages are missing an
	// event time, the publish time is used as a fallback. As event times
	// are user supplied, subsequent messages may have event times less than
	// `event_time` and should be filtered by the client, if necessary.
	EventTime string `json:"eventTime,omitempty"`

	// PublishTime: Request the cursor of the first message with publish
	// time greater than or equal to `publish_time`. All messages thereafter
	// are guaranteed to have publish times >= `publish_time`.
	PublishTime string `json:"publishTime,omitempty"`

	// ForceSendFields is a list of field names (e.g. "EventTime") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "EventTime") to include in
	// API requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

TimeTarget: A target publish or event time. Can be used for seeking to or retrieving the corresponding cursor.

func (*TimeTarget) MarshalJSON

func (s *TimeTarget) MarshalJSON() ([]byte, error)

type Topic

type Topic struct {
	// Name: The name of the topic. Structured like:
	// projects/{project_number}/locations/{location}/topics/{topic_id}
	Name string `json:"name,omitempty"`

	// PartitionConfig: The settings for this topic's partitions.
	PartitionConfig *PartitionConfig `json:"partitionConfig,omitempty"`

	// RetentionConfig: The settings for this topic's message retention.
	RetentionConfig *RetentionConfig `json:"retentionConfig,omitempty"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "Name") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "Name") to include in API
	// requests with the JSON null value. By default, fields with empty
	// values are omitted from API requests. However, any field with an
	// empty value appearing in NullFields will be sent to the server as
	// null. It is an error if a field in this list has a non-empty value.
	// This may be used to include null fields in Patch requests.
	NullFields []string `json:"-"`
}

Topic: Metadata about a topic resource.

func (*Topic) MarshalJSON

func (s *Topic) MarshalJSON() ([]byte, error)

type TopicPartitions

type TopicPartitions struct {
	// PartitionCount: The number of partitions in the topic.
	PartitionCount int64 `json:"partitionCount,omitempty,string"`

	// ServerResponse contains the HTTP response code and headers from the
	// server.
	googleapi.ServerResponse `json:"-"`

	// ForceSendFields is a list of field names (e.g. "PartitionCount") to
	// unconditionally include in API requests. By default, fields with
	// empty values are omitted from API requests. However, any non-pointer,
	// non-interface field appearing in ForceSendFields will be sent to the
	// server regardless of whether the field is empty or not. This may be
	// used to include empty fields in Patch requests.
	ForceSendFields []string `json:"-"`

	// NullFields is a list of field names (e.g. "PartitionCount") to
	// include in API requests with the JSON null value. By default, fields
	// with empty values are omitted from API requests. However, any field
	// with an empty value appearing in NullFields will be sent to the
	// server as null. It is an error if a field in this list has a
	// non-empty value. This may be used to include null fields in Patch
	// requests.
	NullFields []string `json:"-"`
}

TopicPartitions: Response for GetTopicPartitions.

func (*TopicPartitions) MarshalJSON

func (s *TopicPartitions) MarshalJSON() ([]byte, error)

type TopicStatsProjectsLocationsService

type TopicStatsProjectsLocationsService struct {
	Topics *TopicStatsProjectsLocationsTopicsService
	// contains filtered or unexported fields
}

func NewTopicStatsProjectsLocationsService

func NewTopicStatsProjectsLocationsService(s *Service) *TopicStatsProjectsLocationsService

type TopicStatsProjectsLocationsTopicsComputeHeadCursorCall

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

func (*TopicStatsProjectsLocationsTopicsComputeHeadCursorCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*TopicStatsProjectsLocationsTopicsComputeHeadCursorCall) Do

Do executes the "pubsublite.topicStats.projects.locations.topics.computeHeadCursor" call. Exactly one of *ComputeHeadCursorResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ComputeHeadCursorResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*TopicStatsProjectsLocationsTopicsComputeHeadCursorCall) Fields

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

func (*TopicStatsProjectsLocationsTopicsComputeHeadCursorCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type TopicStatsProjectsLocationsTopicsComputeMessageStatsCall

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

func (*TopicStatsProjectsLocationsTopicsComputeMessageStatsCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*TopicStatsProjectsLocationsTopicsComputeMessageStatsCall) Do

Do executes the "pubsublite.topicStats.projects.locations.topics.computeMessageStats" call. Exactly one of *ComputeMessageStatsResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ComputeMessageStatsResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*TopicStatsProjectsLocationsTopicsComputeMessageStatsCall) Fields

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

func (*TopicStatsProjectsLocationsTopicsComputeMessageStatsCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type TopicStatsProjectsLocationsTopicsComputeTimeCursorCall

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

func (*TopicStatsProjectsLocationsTopicsComputeTimeCursorCall) Context

Context sets the context to be used in this call's Do method. Any pending HTTP request will be aborted if the provided context is canceled.

func (*TopicStatsProjectsLocationsTopicsComputeTimeCursorCall) Do

Do executes the "pubsublite.topicStats.projects.locations.topics.computeTimeCursor" call. Exactly one of *ComputeTimeCursorResponse or error will be non-nil. Any non-2xx status code is an error. Response headers are in either *ComputeTimeCursorResponse.ServerResponse.Header or (if a response was returned at all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check whether the returned error was because http.StatusNotModified was returned.

func (*TopicStatsProjectsLocationsTopicsComputeTimeCursorCall) Fields

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

func (*TopicStatsProjectsLocationsTopicsComputeTimeCursorCall) Header

Header returns an http.Header that can be modified by the caller to add HTTP headers to the request.

type TopicStatsProjectsLocationsTopicsService

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

func NewTopicStatsProjectsLocationsTopicsService

func NewTopicStatsProjectsLocationsTopicsService(s *Service) *TopicStatsProjectsLocationsTopicsService

func (*TopicStatsProjectsLocationsTopicsService) ComputeHeadCursor

ComputeHeadCursor: Compute the head cursor for the partition. The head cursor's offset is guaranteed to be less than or equal to all messages which have not yet been acknowledged as published, and greater than the offset of any message whose publish has already been acknowledged. It is zero if there have never been messages in the partition.

- topic: The topic for which we should compute the head cursor.

func (*TopicStatsProjectsLocationsTopicsService) ComputeMessageStats

ComputeMessageStats: Compute statistics about a range of messages in a given topic and partition.

- topic: The topic for which we should compute message stats.

func (*TopicStatsProjectsLocationsTopicsService) ComputeTimeCursor

ComputeTimeCursor: Compute the corresponding cursor for a publish or event time in a topic partition.

- topic: The topic for which we should compute the cursor.

type TopicStatsProjectsService

type TopicStatsProjectsService struct {
	Locations *TopicStatsProjectsLocationsService
	// contains filtered or unexported fields
}

func NewTopicStatsProjectsService

func NewTopicStatsProjectsService(s *Service) *TopicStatsProjectsService

type TopicStatsService

type TopicStatsService struct {
	Projects *TopicStatsProjectsService
	// contains filtered or unexported fields
}

func NewTopicStatsService

func NewTopicStatsService(s *Service) *TopicStatsService

Jump to

Keyboard shortcuts

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