user

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var User_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.User",
	HandlerType: (*UserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UserAdd",
			Handler:    _User_UserAdd_Handler,
		},
		{
			MethodName: "UserUpdate",
			Handler:    _User_UserUpdate_Handler,
		},
		{
			MethodName: "UserInfo",
			Handler:    _User_UserInfo_Handler,
		},
		{
			MethodName: "UserList",
			Handler:    _User_UserList_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user.proto",
}

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

Functions

func RegisterUserServer

func RegisterUserServer(s grpc.ServiceRegistrar, srv UserServer)

Types

type Response

type Response 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Response) Descriptor

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

func (*Response) GetCode

func (m *Response) GetCode() int64

func (*Response) GetMessage

func (m *Response) GetMessage() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) String

func (m *Response) String() string

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

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

func (*Response) XXX_Merge

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

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

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

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServer) UserAdd

func (UnimplementedUserServer) UserInfo

func (UnimplementedUserServer) UserList

func (UnimplementedUserServer) UserUpdate

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 UserAddReq

type UserAddReq struct {
	Account              string   `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Name                 string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Avatar               string   `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserAddReq) Descriptor

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

func (*UserAddReq) GetAccount

func (m *UserAddReq) GetAccount() string

func (*UserAddReq) GetAvatar

func (m *UserAddReq) GetAvatar() string

func (*UserAddReq) GetName

func (m *UserAddReq) GetName() string

func (*UserAddReq) GetPassword

func (m *UserAddReq) GetPassword() string

func (*UserAddReq) ProtoMessage

func (*UserAddReq) ProtoMessage()

func (*UserAddReq) Reset

func (m *UserAddReq) Reset()

func (*UserAddReq) String

func (m *UserAddReq) String() string

func (*UserAddReq) XXX_DiscardUnknown

func (m *UserAddReq) XXX_DiscardUnknown()

func (*UserAddReq) XXX_Marshal

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

func (*UserAddReq) XXX_Merge

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

func (*UserAddReq) XXX_Size

func (m *UserAddReq) XXX_Size() int

func (*UserAddReq) XXX_Unmarshal

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

type UserAddRsp

type UserAddRsp 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"`
	Uid                  uint64   `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserAddRsp) Descriptor

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

func (*UserAddRsp) GetCode

func (m *UserAddRsp) GetCode() int64

func (*UserAddRsp) GetMessage

func (m *UserAddRsp) GetMessage() string

func (*UserAddRsp) GetUid

func (m *UserAddRsp) GetUid() uint64

func (*UserAddRsp) ProtoMessage

func (*UserAddRsp) ProtoMessage()

func (*UserAddRsp) Reset

func (m *UserAddRsp) Reset()

func (*UserAddRsp) String

func (m *UserAddRsp) String() string

func (*UserAddRsp) XXX_DiscardUnknown

func (m *UserAddRsp) XXX_DiscardUnknown()

func (*UserAddRsp) XXX_Marshal

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

func (*UserAddRsp) XXX_Merge

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

func (*UserAddRsp) XXX_Size

func (m *UserAddRsp) XXX_Size() int

func (*UserAddRsp) XXX_Unmarshal

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

type UserClient

type UserClient interface {
	UserAdd(ctx context.Context, in *UserAddReq, opts ...grpc.CallOption) (*UserAddRsp, error)
	UserUpdate(ctx context.Context, in *UserUpdateReq, opts ...grpc.CallOption) (*Response, error)
	UserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoRsp, error)
	UserList(ctx context.Context, in *UserListReq, opts ...grpc.CallOption) (*UserListRsp, 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 UserDetail

type UserDetail struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Account              string   `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
	Name                 string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Avatar               string   `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"`
	Status               string   `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	Password             string   `protobuf:"bytes,6,opt,name=password,proto3" json:"password,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserDetail) Descriptor

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

func (*UserDetail) GetAccount

func (m *UserDetail) GetAccount() string

func (*UserDetail) GetAvatar

func (m *UserDetail) GetAvatar() string

func (*UserDetail) GetId

func (m *UserDetail) GetId() uint64

func (*UserDetail) GetName

func (m *UserDetail) GetName() string

func (*UserDetail) GetPassword

func (m *UserDetail) GetPassword() string

func (*UserDetail) GetStatus

func (m *UserDetail) GetStatus() string

func (*UserDetail) ProtoMessage

func (*UserDetail) ProtoMessage()

func (*UserDetail) Reset

func (m *UserDetail) Reset()

func (*UserDetail) String

func (m *UserDetail) String() string

func (*UserDetail) XXX_DiscardUnknown

func (m *UserDetail) XXX_DiscardUnknown()

func (*UserDetail) XXX_Marshal

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

func (*UserDetail) XXX_Merge

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

func (*UserDetail) XXX_Size

func (m *UserDetail) XXX_Size() int

func (*UserDetail) XXX_Unmarshal

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

type UserInfo

type UserInfo struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Account              string   `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
	Name                 string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Avatar               string   `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"`
	Status               string   `protobuf:"bytes,5,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) GetAccount

func (m *UserInfo) GetAccount() string

func (*UserInfo) GetAvatar

func (m *UserInfo) GetAvatar() string

func (*UserInfo) GetId

func (m *UserInfo) GetId() uint64

func (*UserInfo) GetName

func (m *UserInfo) GetName() string

func (*UserInfo) GetStatus

func (m *UserInfo) GetStatus() string

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 UserInfoReq

type UserInfoReq struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Account              string   `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserInfoReq) Descriptor

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

func (*UserInfoReq) GetAccount

func (m *UserInfoReq) GetAccount() string

func (*UserInfoReq) GetId

func (m *UserInfoReq) GetId() uint64

func (*UserInfoReq) ProtoMessage

func (*UserInfoReq) ProtoMessage()

func (*UserInfoReq) Reset

func (m *UserInfoReq) Reset()

func (*UserInfoReq) String

func (m *UserInfoReq) String() string

func (*UserInfoReq) XXX_DiscardUnknown

func (m *UserInfoReq) XXX_DiscardUnknown()

func (*UserInfoReq) XXX_Marshal

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

func (*UserInfoReq) XXX_Merge

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

func (*UserInfoReq) XXX_Size

func (m *UserInfoReq) XXX_Size() int

func (*UserInfoReq) XXX_Unmarshal

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

type UserInfoRsp

type UserInfoRsp 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"`
	User                 *UserDetail `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*UserInfoRsp) Descriptor

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

func (*UserInfoRsp) GetCode

func (m *UserInfoRsp) GetCode() int64

func (*UserInfoRsp) GetMessage

func (m *UserInfoRsp) GetMessage() string

func (*UserInfoRsp) GetUser

func (m *UserInfoRsp) GetUser() *UserDetail

func (*UserInfoRsp) ProtoMessage

func (*UserInfoRsp) ProtoMessage()

func (*UserInfoRsp) Reset

func (m *UserInfoRsp) Reset()

func (*UserInfoRsp) String

func (m *UserInfoRsp) String() string

func (*UserInfoRsp) XXX_DiscardUnknown

func (m *UserInfoRsp) XXX_DiscardUnknown()

func (*UserInfoRsp) XXX_Marshal

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

func (*UserInfoRsp) XXX_Merge

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

func (*UserInfoRsp) XXX_Size

func (m *UserInfoRsp) XXX_Size() int

func (*UserInfoRsp) XXX_Unmarshal

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

type UserListReq

type UserListReq struct {
	Id                   []uint64 `protobuf:"varint,1,rep,packed,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserListReq) Descriptor

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

func (*UserListReq) GetId

func (m *UserListReq) GetId() []uint64

func (*UserListReq) ProtoMessage

func (*UserListReq) ProtoMessage()

func (*UserListReq) Reset

func (m *UserListReq) Reset()

func (*UserListReq) String

func (m *UserListReq) String() string

func (*UserListReq) XXX_DiscardUnknown

func (m *UserListReq) XXX_DiscardUnknown()

func (*UserListReq) XXX_Marshal

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

func (*UserListReq) XXX_Merge

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

func (*UserListReq) XXX_Size

func (m *UserListReq) XXX_Size() int

func (*UserListReq) XXX_Unmarshal

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

type UserListRsp

type UserListRsp 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"`
	User                 []*UserInfo `protobuf:"bytes,3,rep,name=user,proto3" json:"user,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*UserListRsp) Descriptor

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

func (*UserListRsp) GetCode

func (m *UserListRsp) GetCode() int64

func (*UserListRsp) GetMessage

func (m *UserListRsp) GetMessage() string

func (*UserListRsp) GetUser

func (m *UserListRsp) GetUser() []*UserInfo

func (*UserListRsp) ProtoMessage

func (*UserListRsp) ProtoMessage()

func (*UserListRsp) Reset

func (m *UserListRsp) Reset()

func (*UserListRsp) String

func (m *UserListRsp) String() string

func (*UserListRsp) XXX_DiscardUnknown

func (m *UserListRsp) XXX_DiscardUnknown()

func (*UserListRsp) XXX_Marshal

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

func (*UserListRsp) XXX_Merge

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

func (*UserListRsp) XXX_Size

func (m *UserListRsp) XXX_Size() int

func (*UserListRsp) XXX_Unmarshal

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

type UserServer

type UserServer interface {
	UserAdd(context.Context, *UserAddReq) (*UserAddRsp, error)
	UserUpdate(context.Context, *UserUpdateReq) (*Response, error)
	UserInfo(context.Context, *UserInfoReq) (*UserInfoRsp, error)
	UserList(context.Context, *UserListReq) (*UserListRsp, error)
	// contains filtered or unexported methods
}

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

type UserUpdateReq

type UserUpdateReq struct {
	Id                   uint64   `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Password             string   `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	Name                 string   `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
	Avatar               string   `protobuf:"bytes,4,opt,name=avatar,proto3" json:"avatar,omitempty"`
	Status               string   `protobuf:"bytes,5,opt,name=status,proto3" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*UserUpdateReq) Descriptor

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

func (*UserUpdateReq) GetAvatar

func (m *UserUpdateReq) GetAvatar() string

func (*UserUpdateReq) GetId

func (m *UserUpdateReq) GetId() uint64

func (*UserUpdateReq) GetName

func (m *UserUpdateReq) GetName() string

func (*UserUpdateReq) GetPassword

func (m *UserUpdateReq) GetPassword() string

func (*UserUpdateReq) GetStatus

func (m *UserUpdateReq) GetStatus() string

func (*UserUpdateReq) ProtoMessage

func (*UserUpdateReq) ProtoMessage()

func (*UserUpdateReq) Reset

func (m *UserUpdateReq) Reset()

func (*UserUpdateReq) String

func (m *UserUpdateReq) String() string

func (*UserUpdateReq) XXX_DiscardUnknown

func (m *UserUpdateReq) XXX_DiscardUnknown()

func (*UserUpdateReq) XXX_Marshal

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

func (*UserUpdateReq) XXX_Merge

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

func (*UserUpdateReq) XXX_Size

func (m *UserUpdateReq) XXX_Size() int

func (*UserUpdateReq) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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