endpoints_examples_bookstore_v2

package
v0.0.0-...-fc94e05 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBookstoreServer

func RegisterBookstoreServer(s *grpc.Server, srv BookstoreServer)

Types

type BookstoreClient

type BookstoreClient interface {
	// Returns a list of all shelves in the bookstore.
	GetShelf(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, error)
	// Returns a list of all shelves in the bookstore.
	// Specifically not using google.api.http option
	// to test grpc_transcoding auto_binding feature.
	// HTTP client can call this method with:
	// POST /endpoints.examples.bookstore.v2.Bookstore/GetShelfAutoBind
	GetShelfAutoBind(ctx context.Context, in *GetShelfRequest, opts ...grpc.CallOption) (*Shelf, error)
}

BookstoreClient is the client API for Bookstore service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewBookstoreClient

func NewBookstoreClient(cc grpc.ClientConnInterface) BookstoreClient

type BookstoreServer

type BookstoreServer interface {
	// Returns a list of all shelves in the bookstore.
	GetShelf(context.Context, *GetShelfRequest) (*Shelf, error)
	// Returns a list of all shelves in the bookstore.
	// Specifically not using google.api.http option
	// to test grpc_transcoding auto_binding feature.
	// HTTP client can call this method with:
	// POST /endpoints.examples.bookstore.v2.Bookstore/GetShelfAutoBind
	GetShelfAutoBind(context.Context, *GetShelfRequest) (*Shelf, error)
}

BookstoreServer is the server API for Bookstore service.

type GetShelfRequest

type GetShelfRequest struct {
	// The ID of the shelf resource to retrieve.
	Shelf                int64    `protobuf:"varint,1,opt,name=shelf,proto3" json:"shelf,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Request message for GetShelf method.

func (*GetShelfRequest) Descriptor

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

func (*GetShelfRequest) GetShelf

func (m *GetShelfRequest) GetShelf() int64

func (*GetShelfRequest) ProtoMessage

func (*GetShelfRequest) ProtoMessage()

func (*GetShelfRequest) Reset

func (m *GetShelfRequest) Reset()

func (*GetShelfRequest) String

func (m *GetShelfRequest) String() string

func (*GetShelfRequest) XXX_DiscardUnknown

func (m *GetShelfRequest) XXX_DiscardUnknown()

func (*GetShelfRequest) XXX_Marshal

func (m *GetShelfRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetShelfRequest) XXX_Merge

func (m *GetShelfRequest) XXX_Merge(src proto.Message)

func (*GetShelfRequest) XXX_Size

func (m *GetShelfRequest) XXX_Size() int

func (*GetShelfRequest) XXX_Unmarshal

func (m *GetShelfRequest) XXX_Unmarshal(b []byte) error

type Shelf

type Shelf struct {
	// A unique shelf id.
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// A theme of the shelf (fiction, poetry, etc).
	Theme                string   `protobuf:"bytes,2,opt,name=theme,proto3" json:"theme,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A shelf resource.

func (*Shelf) Descriptor

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

func (*Shelf) GetId

func (m *Shelf) GetId() int64

func (*Shelf) GetTheme

func (m *Shelf) GetTheme() string

func (*Shelf) ProtoMessage

func (*Shelf) ProtoMessage()

func (*Shelf) Reset

func (m *Shelf) Reset()

func (*Shelf) String

func (m *Shelf) String() string

func (*Shelf) XXX_DiscardUnknown

func (m *Shelf) XXX_DiscardUnknown()

func (*Shelf) XXX_Marshal

func (m *Shelf) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Shelf) XXX_Merge

func (m *Shelf) XXX_Merge(src proto.Message)

func (*Shelf) XXX_Size

func (m *Shelf) XXX_Size() int

func (*Shelf) XXX_Unmarshal

func (m *Shelf) XXX_Unmarshal(b []byte) error

type UnimplementedBookstoreServer

type UnimplementedBookstoreServer struct {
}

UnimplementedBookstoreServer can be embedded to have forward compatible implementations.

func (*UnimplementedBookstoreServer) GetShelf

func (*UnimplementedBookstoreServer) GetShelfAutoBind

func (*UnimplementedBookstoreServer) GetShelfAutoBind(ctx context.Context, req *GetShelfRequest) (*Shelf, error)

Jump to

Keyboard shortcuts

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