examples

package
v0.0.0-...-12e7aa8 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package examples shows how to design protos which adhere to the Google Cloud API design guide.

https://cloud.google.com/apis/design/

Index

Constants

This section is empty.

Variables

View Source
var File_go_chromium_org_luci_common_proto_examples_examples_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ListRequest

type ListRequest struct {

	// The value of next_page_token received in a ListResponse. Used to get the
	// next page of records. If empty, gets the first page.
	PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
	// The maximum number of results to include in the response.
	PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
	// contains filtered or unexported fields
}

An example request to list existing records. Demonstrates usage of standard fields.

https://cloud.google.com/apis/design/standard_fields

func (*ListRequest) Descriptor deprecated

func (*ListRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetPageSize

func (x *ListRequest) GetPageSize() int32

func (*ListRequest) GetPageToken

func (x *ListRequest) GetPageToken() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {

	// The record.
	Records []string `protobuf:"bytes,1,rep,name=records,proto3" json:"records,omitempty"`
	// The value to use as the page_token in a ListRequest to get the next page of
	// records. If empty, there are no more records.
	NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
	// contains filtered or unexported fields
}

An example response to a request to list records. Demonstrates usage of standard fields.

https://cloud.google.com/apis/design/standard_fields

func (*ListResponse) Descriptor deprecated

func (*ListResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetNextPageToken

func (x *ListResponse) GetNextPageToken() string

func (*ListResponse) GetRecords

func (x *ListResponse) GetRecords() []string

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

Jump to

Keyboard shortcuts

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