pb

package
v0.0.0-...-0075ac8 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package pb includes protobufs for this example.

Index

Constants

This section is empty.

Variables

View Source
var (
	Cookie_Type_name = map[int32]string{
		0: "Sugar",
		1: "Oatmeal",
		2: "Chocolate",
	}
	Cookie_Type_value = map[string]int32{
		"Sugar":     0,
		"Oatmeal":   1,
		"Chocolate": 2,
	}
)

Enum value maps for Cookie_Type.

View Source
var CookieMonster_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "sesamestreet.CookieMonster",
	HandlerType: (*CookieMonsterServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "EatCookie",
			Handler:    _CookieMonster_EatCookie_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "sesamestreet.proto",
}

CookieMonster_ServiceDesc is the grpc.ServiceDesc for CookieMonster service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_sesamestreet_proto protoreflect.FileDescriptor

Functions

func DRPCRegisterCookieMonster

func DRPCRegisterCookieMonster(mux drpc.Mux, impl DRPCCookieMonsterServer) error

func RegisterCookieMonsterServer

func RegisterCookieMonsterServer(s grpc.ServiceRegistrar, srv CookieMonsterServer)

Types

type Cookie struct {
	Type Cookie_Type `protobuf:"varint,1,opt,name=type,proto3,enum=sesamestreet.Cookie_Type" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*Cookie) Descriptor deprecated

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

Deprecated: Use Cookie.ProtoReflect.Descriptor instead.

func (*Cookie) GetType

func (x *Cookie) GetType() Cookie_Type

func (*Cookie) ProtoMessage

func (*Cookie) ProtoMessage()

func (*Cookie) ProtoReflect

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

func (*Cookie) Reset

func (x *Cookie) Reset()

func (*Cookie) String

func (x *Cookie) String() string

type CookieMonsterClient

type CookieMonsterClient interface {
	EatCookie(ctx context.Context, in *Cookie, opts ...grpc.CallOption) (*Crumbs, error)
}

CookieMonsterClient is the client API for CookieMonster service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

type CookieMonsterServer

type CookieMonsterServer interface {
	EatCookie(context.Context, *Cookie) (*Crumbs, error)
	// contains filtered or unexported methods
}

CookieMonsterServer is the server API for CookieMonster service. All implementations must embed UnimplementedCookieMonsterServer for forward compatibility

type Cookie_Type int32
const (
	Cookie_Sugar     Cookie_Type = 0
	Cookie_Oatmeal   Cookie_Type = 1
	Cookie_Chocolate Cookie_Type = 2
)
func (x Cookie_Type) Enum() *Cookie_Type
func (Cookie_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use Cookie_Type.Descriptor instead.

func (x Cookie_Type) Number() protoreflect.EnumNumber
func (x Cookie_Type) String() string

type Crumbs

type Crumbs struct {
	Cookie *Cookie `protobuf:"bytes,1,opt,name=cookie,proto3" json:"cookie,omitempty"`
	// contains filtered or unexported fields
}

func (*Crumbs) Descriptor deprecated

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

Deprecated: Use Crumbs.ProtoReflect.Descriptor instead.

func (*Crumbs) GetCookie

func (x *Crumbs) GetCookie() *Cookie

func (*Crumbs) ProtoMessage

func (*Crumbs) ProtoMessage()

func (*Crumbs) ProtoReflect

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

func (*Crumbs) Reset

func (x *Crumbs) Reset()

func (*Crumbs) String

func (x *Crumbs) String() string

type DRPCCookieMonsterClient

type DRPCCookieMonsterClient interface {
	DRPCConn() drpc.Conn

	EatCookie(ctx context.Context, in *Cookie) (*Crumbs, error)
}

func NewDRPCCookieMonsterClient

func NewDRPCCookieMonsterClient(cc drpc.Conn) DRPCCookieMonsterClient

type DRPCCookieMonsterDescription

type DRPCCookieMonsterDescription struct{}

func (DRPCCookieMonsterDescription) Method

func (DRPCCookieMonsterDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool)

func (DRPCCookieMonsterDescription) NumMethods

func (DRPCCookieMonsterDescription) NumMethods() int

type DRPCCookieMonsterServer

type DRPCCookieMonsterServer interface {
	EatCookie(context.Context, *Cookie) (*Crumbs, error)
}

type DRPCCookieMonsterUnimplementedServer

type DRPCCookieMonsterUnimplementedServer struct{}

func (*DRPCCookieMonsterUnimplementedServer) EatCookie

type DRPCCookieMonster_EatCookieStream

type DRPCCookieMonster_EatCookieStream interface {
	drpc.Stream
	SendAndClose(*Crumbs) error
}

type UnimplementedCookieMonsterServer

type UnimplementedCookieMonsterServer struct {
}

UnimplementedCookieMonsterServer must be embedded to have forward compatible implementations.

func (UnimplementedCookieMonsterServer) EatCookie

type UnsafeCookieMonsterServer

type UnsafeCookieMonsterServer interface {
	// contains filtered or unexported methods
}

UnsafeCookieMonsterServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CookieMonsterServer will result in compilation errors.

Jump to

Keyboard shortcuts

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