Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterTokenServiceServer(s grpc.ServiceRegistrar, srv TokenServiceServer)
- type Ack
- type TokenRequest
- type TokenServiceClient
- type TokenServiceServer
- type TokenService_TokenChatClient
- type TokenService_TokenChatServer
- type UnimplementedTokenServiceServer
- type UnsafeTokenServiceServer
Constants ¶
const (
TokenService_TokenChat_FullMethodName = "/helloservice.TokenService/tokenChat"
)
Variables ¶
var File_proto_peer_to_peer_proto protoreflect.FileDescriptor
var TokenService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helloservice.TokenService", HandlerType: (*TokenServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "tokenChat", Handler: _TokenService_TokenChat_Handler, ServerStreams: true, ClientStreams: true, }, }, Metadata: "proto/peer-to-peer.proto", }
TokenService_ServiceDesc is the grpc.ServiceDesc for TokenService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterTokenServiceServer ¶
func RegisterTokenServiceServer(s grpc.ServiceRegistrar, srv TokenServiceServer)
Types ¶
type Ack ¶
type Ack struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
HelloReply The response message containing the greetings change name, also add more types in
func (*Ack) Descriptor
deprecated
func (*Ack) GetMessage ¶
func (*Ack) ProtoMessage ¶
func (*Ack) ProtoMessage()
func (*Ack) ProtoReflect ¶
func (x *Ack) ProtoReflect() protoreflect.Message
type TokenRequest ¶
type TokenRequest struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
HelloRequest The request message containing the user's name. change name, also add more types in
func (*TokenRequest) Descriptor
deprecated
func (*TokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use TokenRequest.ProtoReflect.Descriptor instead.
func (*TokenRequest) GetToken ¶
func (x *TokenRequest) GetToken() string
func (*TokenRequest) ProtoMessage ¶
func (*TokenRequest) ProtoMessage()
func (*TokenRequest) ProtoReflect ¶
func (x *TokenRequest) ProtoReflect() protoreflect.Message
func (*TokenRequest) Reset ¶
func (x *TokenRequest) Reset()
func (*TokenRequest) String ¶
func (x *TokenRequest) String() string
type TokenServiceClient ¶
type TokenServiceClient interface { // change these names TokenChat(ctx context.Context, opts ...grpc.CallOption) (TokenService_TokenChatClient, error) }
TokenServiceClient is the client API for TokenService 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 NewTokenServiceClient ¶
func NewTokenServiceClient(cc grpc.ClientConnInterface) TokenServiceClient
type TokenServiceServer ¶
type TokenServiceServer interface { // change these names TokenChat(TokenService_TokenChatServer) error // contains filtered or unexported methods }
TokenServiceServer is the server API for TokenService service. All implementations must embed UnimplementedTokenServiceServer for forward compatibility
type TokenService_TokenChatClient ¶
type TokenService_TokenChatClient interface { Send(*TokenRequest) error Recv() (*TokenRequest, error) grpc.ClientStream }
type TokenService_TokenChatServer ¶
type TokenService_TokenChatServer interface { Send(*TokenRequest) error Recv() (*TokenRequest, error) grpc.ServerStream }
type UnimplementedTokenServiceServer ¶
type UnimplementedTokenServiceServer struct { }
UnimplementedTokenServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedTokenServiceServer) TokenChat ¶
func (UnimplementedTokenServiceServer) TokenChat(TokenService_TokenChatServer) error
type UnsafeTokenServiceServer ¶
type UnsafeTokenServiceServer interface {
// contains filtered or unexported methods
}
UnsafeTokenServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TokenServiceServer will result in compilation errors.