proto

package
v0.0.0-...-1b46898 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Confirmation_Status_name = map[int32]string{
		0: "Error",
		1: "Successful",
	}
	Confirmation_Status_value = map[string]int32{
		"Error":      0,
		"Successful": 1,
	}
)

Enum value maps for Confirmation_Status.

View Source
var File_message_proto protoreflect.FileDescriptor
View Source
var Messenger_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "message.Messenger",
	HandlerType: (*MessengerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "registerMessage",
			Handler:    _Messenger_RegisterMessage_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "message.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 Confirmation

type Confirmation struct {
	Message string              `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	Status  Confirmation_Status `protobuf:"varint,2,opt,name=status,proto3,enum=message.Confirmation_Status" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*Confirmation) Descriptor deprecated

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

Deprecated: Use Confirmation.ProtoReflect.Descriptor instead.

func (*Confirmation) GetMessage

func (x *Confirmation) GetMessage() string

func (*Confirmation) GetStatus

func (x *Confirmation) GetStatus() Confirmation_Status

func (*Confirmation) ProtoMessage

func (*Confirmation) ProtoMessage()

func (*Confirmation) ProtoReflect

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

func (*Confirmation) Reset

func (x *Confirmation) Reset()

func (*Confirmation) String

func (x *Confirmation) String() string

type Confirmation_Status

type Confirmation_Status int32
const (
	Confirmation_Error      Confirmation_Status = 0
	Confirmation_Successful Confirmation_Status = 1
)

func (Confirmation_Status) Descriptor

func (Confirmation_Status) Enum

func (Confirmation_Status) EnumDescriptor deprecated

func (Confirmation_Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Confirmation_Status.Descriptor instead.

func (Confirmation_Status) Number

func (Confirmation_Status) String

func (x Confirmation_Status) String() string

func (Confirmation_Status) Type

type Message

type Message struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Location    string `protobuf:"bytes,2,opt,name=location,proto3" json:"location,omitempty"`
	Gender      string `protobuf:"bytes,3,opt,name=gender,proto3" json:"gender,omitempty"`
	Age         int32  `protobuf:"varint,4,opt,name=age,proto3" json:"age,omitempty"`
	VaccineType string `protobuf:"bytes,5,opt,name=vaccine_type,json=vaccineType,proto3" json:"vaccine_type,omitempty"`
	Service     string `protobuf:"bytes,6,opt,name=service,proto3" json:"service,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetAge

func (x *Message) GetAge() int32

func (*Message) GetGender

func (x *Message) GetGender() string

func (*Message) GetLocation

func (x *Message) GetLocation() string

func (*Message) GetName

func (x *Message) GetName() string

func (*Message) GetService

func (x *Message) GetService() string

func (*Message) GetVaccineType

func (x *Message) GetVaccineType() string

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) ProtoReflect

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

func (*Message) Reset

func (x *Message) Reset()

func (*Message) String

func (x *Message) String() string

type MessengerClient

type MessengerClient interface {
	RegisterMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Confirmation, 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 {
	RegisterMessage(context.Context, *Message) (*Confirmation, error)
	// contains filtered or unexported methods
}

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

type UnimplementedMessengerServer

type UnimplementedMessengerServer struct {
}

UnimplementedMessengerServer must be embedded to have forward compatible implementations.

func (UnimplementedMessengerServer) RegisterMessage

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