pb

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_backend_proto protoreflect.FileDescriptor

Functions

func RegisterBackendServer

func RegisterBackendServer(s grpc.ServiceRegistrar, srv BackendServer)

Types

type BackendClient

type BackendClient interface {
	GetChat(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*ChatResponse, error)
	GetChatsList(ctx context.Context, in *ChatRequest, opts ...grpc.CallOption) (*ChatResponse, error)
}

BackendClient is the client API for Backend 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 NewBackendClient

func NewBackendClient(cc grpc.ClientConnInterface) BackendClient

type BackendServer

type BackendServer interface {
	GetChat(context.Context, *ChatRequest) (*ChatResponse, error)
	GetChatsList(context.Context, *ChatRequest) (*ChatResponse, error)
	// contains filtered or unexported methods
}

BackendServer is the server API for Backend service. All implementations must embed UnimplementedBackendServer for forward compatibility

type Chat

type Chat struct {
	Id        int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Title     string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"`
	Type      string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	Username  string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
	FirstName string `protobuf:"bytes,5,opt,name=first_name,json=firstName,proto3" json:"first_name,omitempty"`
	LastName  string `protobuf:"bytes,6,opt,name=last_name,json=lastName,proto3" json:"last_name,omitempty"`
	// contains filtered or unexported fields
}

func (*Chat) Descriptor deprecated

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

Deprecated: Use Chat.ProtoReflect.Descriptor instead.

func (*Chat) GetFirstName

func (x *Chat) GetFirstName() string

func (*Chat) GetId

func (x *Chat) GetId() int64

func (*Chat) GetLastName

func (x *Chat) GetLastName() string

func (*Chat) GetTitle

func (x *Chat) GetTitle() string

func (*Chat) GetType

func (x *Chat) GetType() string

func (*Chat) GetUsername

func (x *Chat) GetUsername() string

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 ChatRequest

type ChatRequest struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	Type     string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatRequest) Descriptor deprecated

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

Deprecated: Use ChatRequest.ProtoReflect.Descriptor instead.

func (*ChatRequest) GetId

func (x *ChatRequest) GetId() int64

func (*ChatRequest) GetType

func (x *ChatRequest) GetType() string

func (*ChatRequest) GetUsername

func (x *ChatRequest) GetUsername() 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 ChatResponse

type ChatResponse struct {
	Code    int64   `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Message string  `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	Chats   []*Chat `protobuf:"bytes,3,rep,name=chats,proto3" json:"chats,omitempty"`
	// contains filtered or unexported fields
}

func (*ChatResponse) Descriptor deprecated

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

Deprecated: Use ChatResponse.ProtoReflect.Descriptor instead.

func (*ChatResponse) GetChats

func (x *ChatResponse) GetChats() []*Chat

func (*ChatResponse) GetCode

func (x *ChatResponse) GetCode() int64

func (*ChatResponse) GetMessage

func (x *ChatResponse) GetMessage() string

func (*ChatResponse) ProtoMessage

func (*ChatResponse) ProtoMessage()

func (*ChatResponse) ProtoReflect

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

func (*ChatResponse) Reset

func (x *ChatResponse) Reset()

func (*ChatResponse) String

func (x *ChatResponse) String() string

type UnimplementedBackendServer

type UnimplementedBackendServer struct {
}

UnimplementedBackendServer must be embedded to have forward compatible implementations.

func (UnimplementedBackendServer) GetChat

func (UnimplementedBackendServer) GetChatsList

type UnsafeBackendServer

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

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

Jump to

Keyboard shortcuts

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