pb

package
v0.0.0-...-714bc2e Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterUserServer

func RegisterUserServer(s *grpc.Server, srv UserServer)

Types

type GetRequest

type GetRequest struct {
	Id                   int64    `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetRequest) Descriptor

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

func (*GetRequest) GetId

func (m *GetRequest) GetId() int64

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset

func (m *GetRequest) Reset()

func (*GetRequest) String

func (m *GetRequest) String() string

func (*GetRequest) XXX_DiscardUnknown

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal

func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRequest) XXX_Merge

func (m *GetRequest) XXX_Merge(src proto.Message)

func (*GetRequest) XXX_Size

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal

func (m *GetRequest) XXX_Unmarshal(b []byte) error

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer can be embedded to have forward compatible implementations.

func (*UnimplementedUserServer) Create

func (*UnimplementedUserServer) Login

type UserClient

type UserClient interface {
	// 用户注册
	Create(ctx context.Context, in *UserInfo, opts ...grpc.CallOption) (*UserInfo, error)
	// 用户登录
	Login(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*UserInfo, error)
}

UserClient is the client API for User service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewUserClient

func NewUserClient(cc *grpc.ClientConn) UserClient

type UserInfo

type UserInfo struct {
	// 用户 id
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// 用户名称
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// 用户邮箱
	Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
	// 用户状态
	Status               bool     `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

用户信息

func (*UserInfo) Descriptor

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

func (*UserInfo) GetEmail

func (m *UserInfo) GetEmail() string

func (*UserInfo) GetId

func (m *UserInfo) GetId() int64

func (*UserInfo) GetName

func (m *UserInfo) GetName() string

func (*UserInfo) GetStatus

func (m *UserInfo) GetStatus() bool

func (*UserInfo) ProtoMessage

func (*UserInfo) ProtoMessage()

func (*UserInfo) Reset

func (m *UserInfo) Reset()

func (*UserInfo) String

func (m *UserInfo) String() string

func (*UserInfo) XXX_DiscardUnknown

func (m *UserInfo) XXX_DiscardUnknown()

func (*UserInfo) XXX_Marshal

func (m *UserInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*UserInfo) XXX_Merge

func (m *UserInfo) XXX_Merge(src proto.Message)

func (*UserInfo) XXX_Size

func (m *UserInfo) XXX_Size() int

func (*UserInfo) XXX_Unmarshal

func (m *UserInfo) XXX_Unmarshal(b []byte) error

type UserServer

type UserServer interface {
	// 用户注册
	Create(context.Context, *UserInfo) (*UserInfo, error)
	// 用户登录
	Login(context.Context, *GetRequest) (*UserInfo, error)
}

UserServer is the server API for User service.

Jump to

Keyboard shortcuts

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