proto

package
v0.0.0-...-6ed6b24 Latest Latest
Warning

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

Go to latest
Published: May 19, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_service_proto protoreflect.FileDescriptor

Functions

func RegisterBroadcastServer

func RegisterBroadcastServer(s *grpc.Server, srv BroadcastServer)

Types

type BroadcastClient

type BroadcastClient interface {
	SendMessage(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Close, error)
	RecvMessages(ctx context.Context, in *Connect, opts ...grpc.CallOption) (Broadcast_RecvMessagesClient, error)
}

BroadcastClient is the client API for Broadcast service.

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

func NewBroadcastClient

func NewBroadcastClient(cc grpc.ClientConnInterface) BroadcastClient

type BroadcastServer

type BroadcastServer interface {
	SendMessage(context.Context, *Message) (*Close, error)
	RecvMessages(*Connect, Broadcast_RecvMessagesServer) error
}

BroadcastServer is the server API for Broadcast service.

type Broadcast_RecvMessagesClient

type Broadcast_RecvMessagesClient interface {
	Recv() (*Message, error)
	grpc.ClientStream
}

type Broadcast_RecvMessagesServer

type Broadcast_RecvMessagesServer interface {
	Send(*Message) error
	grpc.ServerStream
}

type Close

type Close struct {
	// contains filtered or unexported fields
}

func (*Close) Descriptor deprecated

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

Deprecated: Use Close.ProtoReflect.Descriptor instead.

func (*Close) ProtoMessage

func (*Close) ProtoMessage()

func (*Close) ProtoReflect

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

func (*Close) Reset

func (x *Close) Reset()

func (*Close) String

func (x *Close) String() string

type Connect

type Connect struct {
	User   *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
	Active bool  `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"`
	// contains filtered or unexported fields
}

func (*Connect) Descriptor deprecated

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

Deprecated: Use Connect.ProtoReflect.Descriptor instead.

func (*Connect) GetActive

func (x *Connect) GetActive() bool

func (*Connect) GetUser

func (x *Connect) GetUser() *User

func (*Connect) ProtoMessage

func (*Connect) ProtoMessage()

func (*Connect) ProtoReflect

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

func (*Connect) Reset

func (x *Connect) Reset()

func (*Connect) String

func (x *Connect) String() string

type Message

type Message struct {
	Id        string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Content   string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
	Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetContent

func (x *Message) GetContent() string

func (*Message) GetId

func (x *Message) GetId() string

func (*Message) GetTimestamp

func (x *Message) GetTimestamp() 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 UnimplementedBroadcastServer

type UnimplementedBroadcastServer struct {
}

UnimplementedBroadcastServer can be embedded to have forward compatible implementations.

func (*UnimplementedBroadcastServer) RecvMessages

func (*UnimplementedBroadcastServer) SendMessage

type User

type User struct {
	Id   string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetId

func (x *User) GetId() string

func (*User) GetName

func (x *User) GetName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

Jump to

Keyboard shortcuts

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