userv1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_user_v1_user_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.v1.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Say",
			Handler:    _UserService_Say_Handler,
		},
		{
			MethodName: "Login",
			Handler:    _UserService_Login_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "Introduce",
			Handler:       _UserService_Introduce_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "user/v1/user.proto",
}

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

Functions

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type IntroduceRequest added in v0.2.0

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

func (*IntroduceRequest) Descriptor deprecated added in v0.2.0

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

Deprecated: Use IntroduceRequest.ProtoReflect.Descriptor instead.

func (*IntroduceRequest) GetName added in v0.2.0

func (x *IntroduceRequest) GetName() string

func (*IntroduceRequest) ProtoMessage added in v0.2.0

func (*IntroduceRequest) ProtoMessage()

func (*IntroduceRequest) ProtoReflect added in v0.2.0

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

func (*IntroduceRequest) Reset added in v0.2.0

func (x *IntroduceRequest) Reset()

func (*IntroduceRequest) String added in v0.2.0

func (x *IntroduceRequest) String() string

type IntroduceResponse added in v0.2.0

type IntroduceResponse struct {
	Sentence string `protobuf:"bytes,1,opt,name=sentence,proto3" json:"sentence,omitempty"`
	// contains filtered or unexported fields
}

func (*IntroduceResponse) Descriptor deprecated added in v0.2.0

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

Deprecated: Use IntroduceResponse.ProtoReflect.Descriptor instead.

func (*IntroduceResponse) GetSentence added in v0.2.0

func (x *IntroduceResponse) GetSentence() string

func (*IntroduceResponse) ProtoMessage added in v0.2.0

func (*IntroduceResponse) ProtoMessage()

func (*IntroduceResponse) ProtoReflect added in v0.2.0

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

func (*IntroduceResponse) Reset added in v0.2.0

func (x *IntroduceResponse) Reset()

func (*IntroduceResponse) String added in v0.2.0

func (x *IntroduceResponse) String() string

type LoginRequest

type LoginRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginRequest) Descriptor deprecated

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

Deprecated: Use LoginRequest.ProtoReflect.Descriptor instead.

func (*LoginRequest) GetPassword

func (x *LoginRequest) GetPassword() string

func (*LoginRequest) GetUsername

func (x *LoginRequest) GetUsername() string

func (*LoginRequest) ProtoMessage

func (*LoginRequest) ProtoMessage()

func (*LoginRequest) ProtoReflect

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

func (*LoginRequest) Reset

func (x *LoginRequest) Reset()

func (*LoginRequest) String

func (x *LoginRequest) String() string

type LoginResponse

type LoginResponse struct {
	Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*LoginResponse) Descriptor deprecated

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

Deprecated: Use LoginResponse.ProtoReflect.Descriptor instead.

func (*LoginResponse) GetToken

func (x *LoginResponse) GetToken() string

func (*LoginResponse) ProtoMessage

func (*LoginResponse) ProtoMessage()

func (*LoginResponse) ProtoReflect

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

func (*LoginResponse) Reset

func (x *LoginResponse) Reset()

func (*LoginResponse) String

func (x *LoginResponse) String() string

type SayRequest

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

func (*SayRequest) Descriptor deprecated

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

Deprecated: Use SayRequest.ProtoReflect.Descriptor instead.

func (*SayRequest) GetName added in v0.2.0

func (x *SayRequest) GetName() string

func (*SayRequest) ProtoMessage

func (*SayRequest) ProtoMessage()

func (*SayRequest) ProtoReflect

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

func (*SayRequest) Reset

func (x *SayRequest) Reset()

func (*SayRequest) String

func (x *SayRequest) String() string

type SayResponse

type SayResponse struct {
	Sentence string `protobuf:"bytes,1,opt,name=sentence,proto3" json:"sentence,omitempty"`
	// contains filtered or unexported fields
}

func (*SayResponse) Descriptor deprecated

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

Deprecated: Use SayResponse.ProtoReflect.Descriptor instead.

func (*SayResponse) GetSentence

func (x *SayResponse) GetSentence() string

func (*SayResponse) ProtoMessage

func (*SayResponse) ProtoMessage()

func (*SayResponse) ProtoReflect

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

func (*SayResponse) Reset

func (x *SayResponse) Reset()

func (*SayResponse) String

func (x *SayResponse) String() string

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) Introduce added in v0.2.0

func (UnimplementedUserServiceServer) Login

func (UnimplementedUserServiceServer) Say

type UnsafeUserServiceServer

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

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

type UserServiceClient

type UserServiceClient interface {
	Say(ctx context.Context, in *SayRequest, opts ...grpc.CallOption) (*SayResponse, error)
	Introduce(ctx context.Context, in *IntroduceRequest, opts ...grpc.CallOption) (UserService_IntroduceClient, error)
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
}

UserServiceClient is the client API for UserService 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.

type UserServiceServer

type UserServiceServer interface {
	Say(context.Context, *SayRequest) (*SayResponse, error)
	Introduce(*IntroduceRequest, UserService_IntroduceServer) error
	Login(context.Context, *LoginRequest) (*LoginResponse, error)
}

UserServiceServer is the server API for UserService service. All implementations should embed UnimplementedUserServiceServer for forward compatibility

type UserService_IntroduceClient added in v0.2.0

type UserService_IntroduceClient interface {
	Recv() (*IntroduceResponse, error)
	grpc.ClientStream
}

type UserService_IntroduceServer added in v0.2.0

type UserService_IntroduceServer interface {
	Send(*IntroduceResponse) error
	grpc.ServerStream
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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