pb

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: MIT Imports: 9 Imported by: 0

README

Generate with:

protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative pb/*.proto

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pb_messenger_proto protoreflect.FileDescriptor
View Source
var Messenger_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "pb.Messenger",
	HandlerType: (*MessengerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SendMetagram",
			Handler:    _Messenger_SendMetagram_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "pb/messenger.proto",
}

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

Functions

func RegisterMessengerServer

func RegisterMessengerServer(s grpc.ServiceRegistrar, srv MessengerServer)

Types

type MessengerClient

type MessengerClient interface {
	SendMetagram(ctx context.Context, in *Metagram, opts ...grpc.CallOption) (*Metagram, error)
}

MessengerClient is the client API for Messenger 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.

func NewMessengerClient

func NewMessengerClient(cc grpc.ClientConnInterface) MessengerClient

type MessengerServer

type MessengerServer interface {
	SendMetagram(context.Context, *Metagram) (*Metagram, error)
	// contains filtered or unexported methods
}

MessengerServer is the server API for Messenger service. All implementations must embed UnimplementedMessengerServer for forward compatibility

type Metagram

type Metagram struct {
	Id        string                 `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	From      string                 `protobuf:"bytes,3,opt,name=from,proto3" json:"from,omitempty"`
	Content   string                 `protobuf:"bytes,4,opt,name=content,proto3" json:"content,omitempty"`
	// contains filtered or unexported fields
}

func (*Metagram) Descriptor deprecated

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

Deprecated: Use Metagram.ProtoReflect.Descriptor instead.

func (*Metagram) GetContent

func (x *Metagram) GetContent() string

func (*Metagram) GetCreatedAt

func (x *Metagram) GetCreatedAt() *timestamppb.Timestamp

func (*Metagram) GetFrom

func (x *Metagram) GetFrom() string

func (*Metagram) GetId

func (x *Metagram) GetId() string

func (*Metagram) ProtoMessage

func (*Metagram) ProtoMessage()

func (*Metagram) ProtoReflect

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

func (*Metagram) Reset

func (x *Metagram) Reset()

func (*Metagram) String

func (x *Metagram) String() string

type UnimplementedMessengerServer

type UnimplementedMessengerServer struct {
}

UnimplementedMessengerServer must be embedded to have forward compatible implementations.

func (UnimplementedMessengerServer) SendMetagram

type UnsafeMessengerServer

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

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

Jump to

Keyboard shortcuts

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