cmd_demo

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_cmd_demo_demo_proto protoreflect.FileDescriptor

Functions

func RegisterUserServer

func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)

Types

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServer) UserInfo

type UnsafeUserServer

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

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

type UserClient

type UserClient interface {
	UserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoResp, error)
}

UserClient is the client API for User 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 NewUserClient

func NewUserClient(cc grpc.ClientConnInterface) UserClient

type UserInfoReq

type UserInfoReq struct {
	UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfoReq) Descriptor deprecated

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

Deprecated: Use UserInfoReq.ProtoReflect.Descriptor instead.

func (*UserInfoReq) GetUserId

func (x *UserInfoReq) GetUserId() int64

func (*UserInfoReq) ProtoMessage

func (*UserInfoReq) ProtoMessage()

func (*UserInfoReq) ProtoReflect

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

func (*UserInfoReq) Reset

func (x *UserInfoReq) Reset()

func (*UserInfoReq) String

func (x *UserInfoReq) String() string

type UserInfoResp

type UserInfoResp struct {
	UserId   int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfoResp) Descriptor deprecated

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

Deprecated: Use UserInfoResp.ProtoReflect.Descriptor instead.

func (*UserInfoResp) GetUserId

func (x *UserInfoResp) GetUserId() int64

func (*UserInfoResp) GetUsername

func (x *UserInfoResp) GetUsername() string

func (*UserInfoResp) ProtoMessage

func (*UserInfoResp) ProtoMessage()

func (*UserInfoResp) ProtoReflect

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

func (*UserInfoResp) Reset

func (x *UserInfoResp) Reset()

func (*UserInfoResp) String

func (x *UserInfoResp) String() string

type UserServer

type UserServer interface {
	UserInfo(context.Context, *UserInfoReq) (*UserInfoResp, error)
	// contains filtered or unexported methods
}

UserServer is the server API for User service. All implementations must embed UnimplementedUserServer for forward compatibility

Jump to

Keyboard shortcuts

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