proto

package module
v0.0.0-...-7748a25 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2024 License: GPL-3.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_internal_proto protoreflect.FileDescriptor
View Source
var Server_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "internal.Server",
	HandlerType: (*ServerServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUsers",
			Handler:    _Server_GetUsers_Handler,
		},
		{
			MethodName: "GetChats",
			Handler:    _Server_GetChats_Handler,
		},
		{
			MethodName: "GetChat",
			Handler:    _Server_GetChat_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/internal.proto",
}

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

Functions

func RegisterServerServer

func RegisterServerServer(s grpc.ServiceRegistrar, srv ServerServer)

Types

type Chat

type Chat struct {
	Id       string     `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Messages []*Message `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
	// contains filtered or unexported fields
}

func (*Chat) Descriptor deprecated

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

Deprecated: Use Chat.ProtoReflect.Descriptor instead.

func (*Chat) GetId

func (x *Chat) GetId() string

func (*Chat) GetMessages

func (x *Chat) GetMessages() []*Message

func (*Chat) ProtoMessage

func (*Chat) ProtoMessage()

func (*Chat) ProtoReflect

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

func (*Chat) Reset

func (x *Chat) Reset()

func (*Chat) String

func (x *Chat) String() string

type ChatIds

type ChatIds struct {
	ChatIds []string `protobuf:"bytes,1,rep,name=chat_ids,json=chatIds,proto3" json:"chat_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatIds) Descriptor deprecated

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

Deprecated: Use ChatIds.ProtoReflect.Descriptor instead.

func (*ChatIds) GetChatIds

func (x *ChatIds) GetChatIds() []string

func (*ChatIds) ProtoMessage

func (*ChatIds) ProtoMessage()

func (*ChatIds) ProtoReflect

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

func (*ChatIds) Reset

func (x *ChatIds) Reset()

func (*ChatIds) String

func (x *ChatIds) String() string

type Empty

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

func (*Empty) Descriptor deprecated

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

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

type GetChatRequest

type GetChatRequest struct {
	ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
	// contains filtered or unexported fields
}

func (*GetChatRequest) Descriptor deprecated

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

Deprecated: Use GetChatRequest.ProtoReflect.Descriptor instead.

func (*GetChatRequest) GetChatId

func (x *GetChatRequest) GetChatId() string

func (*GetChatRequest) ProtoMessage

func (*GetChatRequest) ProtoMessage()

func (*GetChatRequest) ProtoReflect

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

func (*GetChatRequest) Reset

func (x *GetChatRequest) Reset()

func (*GetChatRequest) String

func (x *GetChatRequest) String() string

type Message

type Message struct {
	Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	Text   string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

func (*Message) Descriptor deprecated

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

Deprecated: Use Message.ProtoReflect.Descriptor instead.

func (*Message) GetSender

func (x *Message) GetSender() string

func (*Message) GetText

func (x *Message) GetText() 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 ServerClient

type ServerClient interface {
	GetUsers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Users, error)
	GetChats(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ChatIds, error)
	GetChat(ctx context.Context, in *GetChatRequest, opts ...grpc.CallOption) (*Chat, error)
}

ServerClient is the client API for Server 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 NewServerClient

func NewServerClient(cc grpc.ClientConnInterface) ServerClient

type ServerServer

type ServerServer interface {
	GetUsers(context.Context, *Empty) (*Users, error)
	GetChats(context.Context, *Empty) (*ChatIds, error)
	GetChat(context.Context, *GetChatRequest) (*Chat, error)
	// contains filtered or unexported methods
}

ServerServer is the server API for Server service. All implementations must embed UnimplementedServerServer for forward compatibility

type UnimplementedServerServer

type UnimplementedServerServer struct {
}

UnimplementedServerServer must be embedded to have forward compatible implementations.

func (UnimplementedServerServer) GetChat

func (UnimplementedServerServer) GetChats

func (UnimplementedServerServer) GetUsers

type UnsafeServerServer

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

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

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

type Users

type Users struct {
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*Users) Descriptor deprecated

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

Deprecated: Use Users.ProtoReflect.Descriptor instead.

func (*Users) GetUsers

func (x *Users) GetUsers() []*User

func (*Users) ProtoMessage

func (*Users) ProtoMessage()

func (*Users) ProtoReflect

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

func (*Users) Reset

func (x *Users) Reset()

func (*Users) String

func (x *Users) String() string

Jump to

Keyboard shortcuts

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