generated

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

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

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Daemon_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.Daemon",
	HandlerType: (*DaemonServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Online",
			Handler:    _Daemon_Online_Handler,
		},
		{
			MethodName: "Offline",
			Handler:    _Daemon_Offline_Handler,
		},
		{
			MethodName: "CreateChat",
			Handler:    _Daemon_CreateChat_Handler,
		},
		{
			MethodName: "DeleteChat",
			Handler:    _Daemon_DeleteChat_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Send",
			Handler:       _Daemon_Send_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	Metadata: "api.proto",
}

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

Functions

func RegisterDaemonServer

func RegisterDaemonServer(s grpc.ServiceRegistrar, srv DaemonServer)

Types

type ChatMessage

type ChatMessage struct {
	Time *timestamp.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
	Text string               `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatMessage) Descriptor deprecated

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

Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead.

func (*ChatMessage) GetText

func (x *ChatMessage) GetText() string

func (*ChatMessage) GetTime

func (x *ChatMessage) GetTime() *timestamp.Timestamp

func (*ChatMessage) ProtoMessage

func (*ChatMessage) ProtoMessage()

func (*ChatMessage) ProtoReflect

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

func (*ChatMessage) Reset

func (x *ChatMessage) Reset()

func (*ChatMessage) String

func (x *ChatMessage) String() string

type ChatRequest

type ChatRequest struct {
	RecepientAddress string `protobuf:"bytes,1,opt,name=recepient_address,json=recepientAddress,proto3" json:"recepient_address,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatRequest) Descriptor deprecated

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

Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.

func (*ChatRequest) GetRecepientAddress

func (x *ChatRequest) GetRecepientAddress() string

func (*ChatRequest) ProtoMessage

func (*ChatRequest) ProtoMessage()

func (*ChatRequest) ProtoReflect

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

func (*ChatRequest) Reset

func (x *ChatRequest) Reset()

func (*ChatRequest) String

func (x *ChatRequest) String() string

type DaemonClient

type DaemonClient interface {
	Online(ctx context.Context, in *OnlineRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	Offline(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*empty.Empty, error)
	CreateChat(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	DeleteChat(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*empty.Empty, error)
	Send(ctx context.Context, opts ...grpc.CallOption) (Daemon_SendClient, error)
}

DaemonClient is the client API for Daemon 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 NewDaemonClient

func NewDaemonClient(cc grpc.ClientConnInterface) DaemonClient

type DaemonServer

type DaemonServer interface {
	Online(context.Context, *OnlineRequest) (*empty.Empty, error)
	Offline(context.Context, *empty.Empty) (*empty.Empty, error)
	CreateChat(context.Context, *ChatRequest) (*empty.Empty, error)
	DeleteChat(context.Context, *ChatRequest) (*empty.Empty, error)
	Send(Daemon_SendServer) error
	// contains filtered or unexported methods
}

DaemonServer is the server API for Daemon service. All implementations must embed UnimplementedDaemonServer for forward compatibility

type Daemon_SendClient

type Daemon_SendClient interface {
	Send(*ChatMessage) error
	Recv() (*ChatMessage, error)
	grpc.ClientStream
}

type Daemon_SendServer

type Daemon_SendServer interface {
	Send(*ChatMessage) error
	Recv() (*ChatMessage, error)
	grpc.ServerStream
}

type NatsOnline

type NatsOnline struct {
	AuthorAddress string `protobuf:"bytes,1,opt,name=author_address,json=authorAddress,proto3" json:"author_address,omitempty"`
	IsOnline      bool   `protobuf:"varint,2,opt,name=is_online,json=isOnline,proto3" json:"is_online,omitempty"`
	// contains filtered or unexported fields
}

func (*NatsOnline) Descriptor deprecated

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

Deprecated: Use NatsOnline.ProtoReflect.Descriptor instead.

func (*NatsOnline) GetAuthorAddress

func (x *NatsOnline) GetAuthorAddress() string

func (*NatsOnline) GetIsOnline

func (x *NatsOnline) GetIsOnline() bool

func (*NatsOnline) ProtoMessage

func (*NatsOnline) ProtoMessage()

func (*NatsOnline) ProtoReflect

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

func (*NatsOnline) Reset

func (x *NatsOnline) Reset()

func (*NatsOnline) String

func (x *NatsOnline) String() string

type NatsPing

type NatsPing struct {
	AuthorAddress string `protobuf:"bytes,1,opt,name=author_address,json=authorAddress,proto3" json:"author_address,omitempty"`
	// contains filtered or unexported fields
}

func (*NatsPing) Descriptor deprecated

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

Deprecated: Use NatsPing.ProtoReflect.Descriptor instead.

func (*NatsPing) GetAuthorAddress

func (x *NatsPing) GetAuthorAddress() string

func (*NatsPing) ProtoMessage

func (*NatsPing) ProtoMessage()

func (*NatsPing) ProtoReflect

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

func (*NatsPing) Reset

func (x *NatsPing) Reset()

func (*NatsPing) String

func (x *NatsPing) String() string

type OnlineRequest

type OnlineRequest struct {
	NatsUrl       string `protobuf:"bytes,1,opt,name=nats_url,json=natsUrl,proto3" json:"nats_url,omitempty"`
	SenderAddress string `protobuf:"bytes,2,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"`
	// contains filtered or unexported fields
}

func (*OnlineRequest) Descriptor deprecated

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

Deprecated: Use OnlineRequest.ProtoReflect.Descriptor instead.

func (*OnlineRequest) GetNatsUrl

func (x *OnlineRequest) GetNatsUrl() string

func (*OnlineRequest) GetSenderAddress

func (x *OnlineRequest) GetSenderAddress() string

func (*OnlineRequest) ProtoMessage

func (*OnlineRequest) ProtoMessage()

func (*OnlineRequest) ProtoReflect

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

func (*OnlineRequest) Reset

func (x *OnlineRequest) Reset()

func (*OnlineRequest) String

func (x *OnlineRequest) String() string

type UnimplementedDaemonServer

type UnimplementedDaemonServer struct {
}

UnimplementedDaemonServer must be embedded to have forward compatible implementations.

func (UnimplementedDaemonServer) CreateChat

func (UnimplementedDaemonServer) DeleteChat

func (UnimplementedDaemonServer) Offline

func (UnimplementedDaemonServer) Online

func (UnimplementedDaemonServer) Send

type UnsafeDaemonServer

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

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

Jump to

Keyboard shortcuts

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