user

package
v0.0.0-...-c6615d0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppId = "user"
)

Variables

View Source
var (
	ErrInvalidLengthCommon        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowCommon          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupCommon = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthEntityUser        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEntityUser          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEntityUser = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthUser        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowUser          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupUser = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ErrCode_name = map[int32]string{
	0:     "Success",
	10001: "UserNotFound",
	10002: "PasswordIncorrect",
	10003: "UserNotLogin",
}
View Source
var ErrCode_value = map[string]int32{
	"Success":           0,
	"UserNotFound":      10001,
	"PasswordIncorrect": 10002,
	"UserNotLogin":      10003,
}

Functions

func RegisterUserServer

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

Types

type CheckNickNameReq

type CheckNickNameReq struct {
	Nickname             string   `protobuf:"bytes,1,opt,name=Nickname,proto3" json:"Nickname,omitempty" v:"required#昵称不能为空"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

昵称唯一性检测请求参数,用于前后端交互参数格式约定

func (*CheckNickNameReq) Descriptor

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

func (*CheckNickNameReq) GetNickname

func (m *CheckNickNameReq) GetNickname() string

func (*CheckNickNameReq) Marshal

func (m *CheckNickNameReq) Marshal() (dAtA []byte, err error)

func (*CheckNickNameReq) MarshalTo

func (m *CheckNickNameReq) MarshalTo(dAtA []byte) (int, error)

func (*CheckNickNameReq) MarshalToSizedBuffer

func (m *CheckNickNameReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CheckNickNameReq) ProtoMessage

func (*CheckNickNameReq) ProtoMessage()

func (*CheckNickNameReq) Reset

func (m *CheckNickNameReq) Reset()

func (*CheckNickNameReq) Size

func (m *CheckNickNameReq) Size() (n int)

func (*CheckNickNameReq) String

func (m *CheckNickNameReq) String() string

func (*CheckNickNameReq) Unmarshal

func (m *CheckNickNameReq) Unmarshal(dAtA []byte) error

func (*CheckNickNameReq) XXX_DiscardUnknown

func (m *CheckNickNameReq) XXX_DiscardUnknown()

func (*CheckNickNameReq) XXX_Marshal

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

func (*CheckNickNameReq) XXX_Merge

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

func (*CheckNickNameReq) XXX_Size

func (m *CheckNickNameReq) XXX_Size() int

func (*CheckNickNameReq) XXX_Unmarshal

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

type CheckNickNameRes

type CheckNickNameRes struct {
	Ok                   bool     `protobuf:"varint,1,opt,name=Ok,proto3" json:"Ok,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

昵称唯一性检测结果

func (*CheckNickNameRes) Descriptor

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

func (*CheckNickNameRes) GetOk

func (m *CheckNickNameRes) GetOk() bool

func (*CheckNickNameRes) Marshal

func (m *CheckNickNameRes) Marshal() (dAtA []byte, err error)

func (*CheckNickNameRes) MarshalTo

func (m *CheckNickNameRes) MarshalTo(dAtA []byte) (int, error)

func (*CheckNickNameRes) MarshalToSizedBuffer

func (m *CheckNickNameRes) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CheckNickNameRes) ProtoMessage

func (*CheckNickNameRes) ProtoMessage()

func (*CheckNickNameRes) Reset

func (m *CheckNickNameRes) Reset()

func (*CheckNickNameRes) Size

func (m *CheckNickNameRes) Size() (n int)

func (*CheckNickNameRes) String

func (m *CheckNickNameRes) String() string

func (*CheckNickNameRes) Unmarshal

func (m *CheckNickNameRes) Unmarshal(dAtA []byte) error

func (*CheckNickNameRes) XXX_DiscardUnknown

func (m *CheckNickNameRes) XXX_DiscardUnknown()

func (*CheckNickNameRes) XXX_Marshal

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

func (*CheckNickNameRes) XXX_Merge

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

func (*CheckNickNameRes) XXX_Size

func (m *CheckNickNameRes) XXX_Size() int

func (*CheckNickNameRes) XXX_Unmarshal

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

type CheckPassportReq

type CheckPassportReq struct {
	Passport             string   `protobuf:"bytes,1,opt,name=Passport,proto3" json:"Passport,omitempty" v:"required#账号不能为空"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

账号唯一性检测请求参数,用于前后端交互参数格式约定

func (*CheckPassportReq) Descriptor

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

func (*CheckPassportReq) GetPassport

func (m *CheckPassportReq) GetPassport() string

func (*CheckPassportReq) Marshal

func (m *CheckPassportReq) Marshal() (dAtA []byte, err error)

func (*CheckPassportReq) MarshalTo

func (m *CheckPassportReq) MarshalTo(dAtA []byte) (int, error)

func (*CheckPassportReq) MarshalToSizedBuffer

func (m *CheckPassportReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CheckPassportReq) ProtoMessage

func (*CheckPassportReq) ProtoMessage()

func (*CheckPassportReq) Reset

func (m *CheckPassportReq) Reset()

func (*CheckPassportReq) Size

func (m *CheckPassportReq) Size() (n int)

func (*CheckPassportReq) String

func (m *CheckPassportReq) String() string

func (*CheckPassportReq) Unmarshal

func (m *CheckPassportReq) Unmarshal(dAtA []byte) error

func (*CheckPassportReq) XXX_DiscardUnknown

func (m *CheckPassportReq) XXX_DiscardUnknown()

func (*CheckPassportReq) XXX_Marshal

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

func (*CheckPassportReq) XXX_Merge

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

func (*CheckPassportReq) XXX_Size

func (m *CheckPassportReq) XXX_Size() int

func (*CheckPassportReq) XXX_Unmarshal

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

type CheckPassportRes

type CheckPassportRes struct {
	Ok                   bool     `protobuf:"varint,1,opt,name=Ok,proto3" json:"Ok,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

账号唯一性检测结果

func (*CheckPassportRes) Descriptor

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

func (*CheckPassportRes) GetOk

func (m *CheckPassportRes) GetOk() bool

func (*CheckPassportRes) Marshal

func (m *CheckPassportRes) Marshal() (dAtA []byte, err error)

func (*CheckPassportRes) MarshalTo

func (m *CheckPassportRes) MarshalTo(dAtA []byte) (int, error)

func (*CheckPassportRes) MarshalToSizedBuffer

func (m *CheckPassportRes) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CheckPassportRes) ProtoMessage

func (*CheckPassportRes) ProtoMessage()

func (*CheckPassportRes) Reset

func (m *CheckPassportRes) Reset()

func (*CheckPassportRes) Size

func (m *CheckPassportRes) Size() (n int)

func (*CheckPassportRes) String

func (m *CheckPassportRes) String() string

func (*CheckPassportRes) Unmarshal

func (m *CheckPassportRes) Unmarshal(dAtA []byte) error

func (*CheckPassportRes) XXX_DiscardUnknown

func (m *CheckPassportRes) XXX_DiscardUnknown()

func (*CheckPassportRes) XXX_Marshal

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

func (*CheckPassportRes) XXX_Merge

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

func (*CheckPassportRes) XXX_Size

func (m *CheckPassportRes) XXX_Size() int

func (*CheckPassportRes) XXX_Unmarshal

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

type EntityUser

type EntityUser struct {
	Id                   uint32   `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Passport             string   `protobuf:"bytes,2,opt,name=Passport,proto3" json:"Passport,omitempty"`
	Password             string   `protobuf:"bytes,3,opt,name=Password,proto3" json:"Password,omitempty"`
	Nickname             string   `protobuf:"bytes,4,opt,name=Nickname,proto3" json:"Nickname,omitempty"`
	CreateAt             int64    `protobuf:"varint,5,opt,name=CreateAt,proto3" json:"CreateAt,omitempty"`
	UpdateAt             int64    `protobuf:"varint,6,opt,name=UpdateAt,proto3" json:"UpdateAt,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

用户表实体

func (*EntityUser) Descriptor

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

func (*EntityUser) GetCreateAt

func (m *EntityUser) GetCreateAt() int64

func (*EntityUser) GetId

func (m *EntityUser) GetId() uint32

func (*EntityUser) GetNickname

func (m *EntityUser) GetNickname() string

func (*EntityUser) GetPassport

func (m *EntityUser) GetPassport() string

func (*EntityUser) GetPassword

func (m *EntityUser) GetPassword() string

func (*EntityUser) GetUpdateAt

func (m *EntityUser) GetUpdateAt() int64

func (*EntityUser) Marshal

func (m *EntityUser) Marshal() (dAtA []byte, err error)

func (*EntityUser) MarshalTo

func (m *EntityUser) MarshalTo(dAtA []byte) (int, error)

func (*EntityUser) MarshalToSizedBuffer

func (m *EntityUser) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*EntityUser) ProtoMessage

func (*EntityUser) ProtoMessage()

func (*EntityUser) Reset

func (m *EntityUser) Reset()

func (*EntityUser) Size

func (m *EntityUser) Size() (n int)

func (*EntityUser) String

func (m *EntityUser) String() string

func (*EntityUser) Unmarshal

func (m *EntityUser) Unmarshal(dAtA []byte) error

func (*EntityUser) XXX_DiscardUnknown

func (m *EntityUser) XXX_DiscardUnknown()

func (*EntityUser) XXX_Marshal

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

func (*EntityUser) XXX_Merge

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

func (*EntityUser) XXX_Size

func (m *EntityUser) XXX_Size() int

func (*EntityUser) XXX_Unmarshal

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

type ErrCode

type ErrCode int32

[10000 - 11000] 用户错误码范围。

const (
	ErrCode_Success           ErrCode = 0
	ErrCode_UserNotFound      ErrCode = 10001
	ErrCode_PasswordIncorrect ErrCode = 10002
	ErrCode_UserNotLogin      ErrCode = 10003
)

func (ErrCode) EnumDescriptor

func (ErrCode) EnumDescriptor() ([]byte, []int)

func (ErrCode) String

func (x ErrCode) String() string

type GetSessionReq

type GetSessionReq struct {
	Token                string   `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty" v:"required#Token不能为空"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

获取用户Session信息

func (*GetSessionReq) Descriptor

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

func (*GetSessionReq) GetToken

func (m *GetSessionReq) GetToken() string

func (*GetSessionReq) Marshal

func (m *GetSessionReq) Marshal() (dAtA []byte, err error)

func (*GetSessionReq) MarshalTo

func (m *GetSessionReq) MarshalTo(dAtA []byte) (int, error)

func (*GetSessionReq) MarshalToSizedBuffer

func (m *GetSessionReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetSessionReq) ProtoMessage

func (*GetSessionReq) ProtoMessage()

func (*GetSessionReq) Reset

func (m *GetSessionReq) Reset()

func (*GetSessionReq) Size

func (m *GetSessionReq) Size() (n int)

func (*GetSessionReq) String

func (m *GetSessionReq) String() string

func (*GetSessionReq) Unmarshal

func (m *GetSessionReq) Unmarshal(dAtA []byte) error

func (*GetSessionReq) XXX_DiscardUnknown

func (m *GetSessionReq) XXX_DiscardUnknown()

func (*GetSessionReq) XXX_Marshal

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

func (*GetSessionReq) XXX_Merge

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

func (*GetSessionReq) XXX_Size

func (m *GetSessionReq) XXX_Size() int

func (*GetSessionReq) XXX_Unmarshal

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

type GetSessionRes

type GetSessionRes struct {
	User                 *SessionUser `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"`
	LoginTime            int64        `protobuf:"varint,2,opt,name=LoginTime,proto3" json:"LoginTime,omitempty"`
	LoginAgent           string       `protobuf:"bytes,3,opt,name=LoginAgent,proto3" json:"LoginAgent,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

获取用户Session信息结果

func (*GetSessionRes) Descriptor

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

func (*GetSessionRes) GetLoginAgent

func (m *GetSessionRes) GetLoginAgent() string

func (*GetSessionRes) GetLoginTime

func (m *GetSessionRes) GetLoginTime() int64

func (*GetSessionRes) GetUser

func (m *GetSessionRes) GetUser() *SessionUser

func (*GetSessionRes) Marshal

func (m *GetSessionRes) Marshal() (dAtA []byte, err error)

func (*GetSessionRes) MarshalTo

func (m *GetSessionRes) MarshalTo(dAtA []byte) (int, error)

func (*GetSessionRes) MarshalToSizedBuffer

func (m *GetSessionRes) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetSessionRes) ProtoMessage

func (*GetSessionRes) ProtoMessage()

func (*GetSessionRes) Reset

func (m *GetSessionRes) Reset()

func (*GetSessionRes) Size

func (m *GetSessionRes) Size() (n int)

func (*GetSessionRes) String

func (m *GetSessionRes) String() string

func (*GetSessionRes) Unmarshal

func (m *GetSessionRes) Unmarshal(dAtA []byte) error

func (*GetSessionRes) XXX_DiscardUnknown

func (m *GetSessionRes) XXX_DiscardUnknown()

func (*GetSessionRes) XXX_Marshal

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

func (*GetSessionRes) XXX_Merge

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

func (*GetSessionRes) XXX_Size

func (m *GetSessionRes) XXX_Size() int

func (*GetSessionRes) XXX_Unmarshal

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

type GetUserReq

type GetUserReq struct {
	UserId               uint32   `protobuf:"varint,1,opt,name=UserId,proto3" json:"UserId,omitempty" v:"min:1#用户ID不能为空"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

查询指定用户信息

func (*GetUserReq) Descriptor

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

func (*GetUserReq) GetUserId

func (m *GetUserReq) GetUserId() uint32

func (*GetUserReq) Marshal

func (m *GetUserReq) Marshal() (dAtA []byte, err error)

func (*GetUserReq) MarshalTo

func (m *GetUserReq) MarshalTo(dAtA []byte) (int, error)

func (*GetUserReq) MarshalToSizedBuffer

func (m *GetUserReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetUserReq) ProtoMessage

func (*GetUserReq) ProtoMessage()

func (*GetUserReq) Reset

func (m *GetUserReq) Reset()

func (*GetUserReq) Size

func (m *GetUserReq) Size() (n int)

func (*GetUserReq) String

func (m *GetUserReq) String() string

func (*GetUserReq) Unmarshal

func (m *GetUserReq) Unmarshal(dAtA []byte) error

func (*GetUserReq) XXX_DiscardUnknown

func (m *GetUserReq) XXX_DiscardUnknown()

func (*GetUserReq) XXX_Marshal

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

func (*GetUserReq) XXX_Merge

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

func (*GetUserReq) XXX_Size

func (m *GetUserReq) XXX_Size() int

func (*GetUserReq) XXX_Unmarshal

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

type GetUserRes

type GetUserRes struct {
	User                 *EntityUser `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

查询指定用户信息结果

func (*GetUserRes) Descriptor

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

func (*GetUserRes) GetUser

func (m *GetUserRes) GetUser() *EntityUser

func (*GetUserRes) Marshal

func (m *GetUserRes) Marshal() (dAtA []byte, err error)

func (*GetUserRes) MarshalTo

func (m *GetUserRes) MarshalTo(dAtA []byte) (int, error)

func (*GetUserRes) MarshalToSizedBuffer

func (m *GetUserRes) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*GetUserRes) ProtoMessage

func (*GetUserRes) ProtoMessage()

func (*GetUserRes) Reset

func (m *GetUserRes) Reset()

func (*GetUserRes) Size

func (m *GetUserRes) Size() (n int)

func (*GetUserRes) String

func (m *GetUserRes) String() string

func (*GetUserRes) Unmarshal

func (m *GetUserRes) Unmarshal(dAtA []byte) error

func (*GetUserRes) XXX_DiscardUnknown

func (m *GetUserRes) XXX_DiscardUnknown()

func (*GetUserRes) XXX_Marshal

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

func (*GetUserRes) XXX_Merge

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

func (*GetUserRes) XXX_Size

func (m *GetUserRes) XXX_Size() int

func (*GetUserRes) XXX_Unmarshal

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

type NullReq

type NullReq struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

空请求

func (*NullReq) Descriptor

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

func (*NullReq) Marshal

func (m *NullReq) Marshal() (dAtA []byte, err error)

func (*NullReq) MarshalTo

func (m *NullReq) MarshalTo(dAtA []byte) (int, error)

func (*NullReq) MarshalToSizedBuffer

func (m *NullReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NullReq) ProtoMessage

func (*NullReq) ProtoMessage()

func (*NullReq) Reset

func (m *NullReq) Reset()

func (*NullReq) Size

func (m *NullReq) Size() (n int)

func (*NullReq) String

func (m *NullReq) String() string

func (*NullReq) Unmarshal

func (m *NullReq) Unmarshal(dAtA []byte) error

func (*NullReq) XXX_DiscardUnknown

func (m *NullReq) XXX_DiscardUnknown()

func (*NullReq) XXX_Marshal

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

func (*NullReq) XXX_Merge

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

func (*NullReq) XXX_Size

func (m *NullReq) XXX_Size() int

func (*NullReq) XXX_Unmarshal

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

type NullRes

type NullRes struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

空返回

func (*NullRes) Descriptor

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

func (*NullRes) Marshal

func (m *NullRes) Marshal() (dAtA []byte, err error)

func (*NullRes) MarshalTo

func (m *NullRes) MarshalTo(dAtA []byte) (int, error)

func (*NullRes) MarshalToSizedBuffer

func (m *NullRes) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*NullRes) ProtoMessage

func (*NullRes) ProtoMessage()

func (*NullRes) Reset

func (m *NullRes) Reset()

func (*NullRes) Size

func (m *NullRes) Size() (n int)

func (*NullRes) String

func (m *NullRes) String() string

func (*NullRes) Unmarshal

func (m *NullRes) Unmarshal(dAtA []byte) error

func (*NullRes) XXX_DiscardUnknown

func (m *NullRes) XXX_DiscardUnknown()

func (*NullRes) XXX_Marshal

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

func (*NullRes) XXX_Merge

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

func (*NullRes) XXX_Size

func (m *NullRes) XXX_Size() int

func (*NullRes) XXX_Unmarshal

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

type SessionUser

type SessionUser struct {
	Id                   uint32   `protobuf:"varint,1,opt,name=Id,proto3" json:"Id,omitempty"`
	Passport             string   `protobuf:"bytes,2,opt,name=Passport,proto3" json:"Passport,omitempty"`
	Password             string   `protobuf:"bytes,3,opt,name=Password,proto3" json:"Password,omitempty"`
	Nickname             string   `protobuf:"bytes,4,opt,name=Nickname,proto3" json:"Nickname,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SessionUser) Descriptor

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

func (*SessionUser) GetId

func (m *SessionUser) GetId() uint32

func (*SessionUser) GetNickname

func (m *SessionUser) GetNickname() string

func (*SessionUser) GetPassport

func (m *SessionUser) GetPassport() string

func (*SessionUser) GetPassword

func (m *SessionUser) GetPassword() string

func (*SessionUser) Marshal

func (m *SessionUser) Marshal() (dAtA []byte, err error)

func (*SessionUser) MarshalTo

func (m *SessionUser) MarshalTo(dAtA []byte) (int, error)

func (*SessionUser) MarshalToSizedBuffer

func (m *SessionUser) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SessionUser) ProtoMessage

func (*SessionUser) ProtoMessage()

func (*SessionUser) Reset

func (m *SessionUser) Reset()

func (*SessionUser) Size

func (m *SessionUser) Size() (n int)

func (*SessionUser) String

func (m *SessionUser) String() string

func (*SessionUser) Unmarshal

func (m *SessionUser) Unmarshal(dAtA []byte) error

func (*SessionUser) XXX_DiscardUnknown

func (m *SessionUser) XXX_DiscardUnknown()

func (*SessionUser) XXX_Marshal

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

func (*SessionUser) XXX_Merge

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

func (*SessionUser) XXX_Size

func (m *SessionUser) XXX_Size() int

func (*SessionUser) XXX_Unmarshal

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

type SignInReq

type SignInReq struct {
	// 账号
	Passport string `protobuf:"bytes,1,opt,name=Passport,proto3" json:"Passport,omitempty" v:"required#账号不能为空"`
	// 密码
	Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty" v:"required#密码不能为空"`
	// 客户端类型(H5/IOS/Android/Wechat/Micro)
	Agent                string   `protobuf:"bytes,3,opt,name=Agent,proto3" json:"Agent,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

登录请求

func (*SignInReq) Descriptor

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

func (*SignInReq) GetAgent

func (m *SignInReq) GetAgent() string

func (*SignInReq) GetPassport

func (m *SignInReq) GetPassport() string

func (*SignInReq) GetPassword

func (m *SignInReq) GetPassword() string

func (*SignInReq) Marshal

func (m *SignInReq) Marshal() (dAtA []byte, err error)

func (*SignInReq) MarshalTo

func (m *SignInReq) MarshalTo(dAtA []byte) (int, error)

func (*SignInReq) MarshalToSizedBuffer

func (m *SignInReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SignInReq) ProtoMessage

func (*SignInReq) ProtoMessage()

func (*SignInReq) Reset

func (m *SignInReq) Reset()

func (*SignInReq) Size

func (m *SignInReq) Size() (n int)

func (*SignInReq) String

func (m *SignInReq) String() string

func (*SignInReq) Unmarshal

func (m *SignInReq) Unmarshal(dAtA []byte) error

func (*SignInReq) XXX_DiscardUnknown

func (m *SignInReq) XXX_DiscardUnknown()

func (*SignInReq) XXX_Marshal

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

func (*SignInReq) XXX_Merge

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

func (*SignInReq) XXX_Size

func (m *SignInReq) XXX_Size() int

func (*SignInReq) XXX_Unmarshal

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

type SignInRes

type SignInRes struct {
	User                 *EntityUser `protobuf:"bytes,1,opt,name=User,proto3" json:"User,omitempty"`
	Token                string      `protobuf:"bytes,2,opt,name=Token,proto3" json:"Token,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

登录结果

func (*SignInRes) Descriptor

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

func (*SignInRes) GetToken

func (m *SignInRes) GetToken() string

func (*SignInRes) GetUser

func (m *SignInRes) GetUser() *EntityUser

func (*SignInRes) Marshal

func (m *SignInRes) Marshal() (dAtA []byte, err error)

func (*SignInRes) MarshalTo

func (m *SignInRes) MarshalTo(dAtA []byte) (int, error)

func (*SignInRes) MarshalToSizedBuffer

func (m *SignInRes) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SignInRes) ProtoMessage

func (*SignInRes) ProtoMessage()

func (*SignInRes) Reset

func (m *SignInRes) Reset()

func (*SignInRes) Size

func (m *SignInRes) Size() (n int)

func (*SignInRes) String

func (m *SignInRes) String() string

func (*SignInRes) Unmarshal

func (m *SignInRes) Unmarshal(dAtA []byte) error

func (*SignInRes) XXX_DiscardUnknown

func (m *SignInRes) XXX_DiscardUnknown()

func (*SignInRes) XXX_Marshal

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

func (*SignInRes) XXX_Merge

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

func (*SignInRes) XXX_Size

func (m *SignInRes) XXX_Size() int

func (*SignInRes) XXX_Unmarshal

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

type SignOutReq

type SignOutReq struct {
	Token                string   `protobuf:"bytes,1,opt,name=Token,proto3" json:"Token,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

注销请求

func (*SignOutReq) Descriptor

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

func (*SignOutReq) GetToken

func (m *SignOutReq) GetToken() string

func (*SignOutReq) Marshal

func (m *SignOutReq) Marshal() (dAtA []byte, err error)

func (*SignOutReq) MarshalTo

func (m *SignOutReq) MarshalTo(dAtA []byte) (int, error)

func (*SignOutReq) MarshalToSizedBuffer

func (m *SignOutReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SignOutReq) ProtoMessage

func (*SignOutReq) ProtoMessage()

func (*SignOutReq) Reset

func (m *SignOutReq) Reset()

func (*SignOutReq) Size

func (m *SignOutReq) Size() (n int)

func (*SignOutReq) String

func (m *SignOutReq) String() string

func (*SignOutReq) Unmarshal

func (m *SignOutReq) Unmarshal(dAtA []byte) error

func (*SignOutReq) XXX_DiscardUnknown

func (m *SignOutReq) XXX_DiscardUnknown()

func (*SignOutReq) XXX_Marshal

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

func (*SignOutReq) XXX_Merge

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

func (*SignOutReq) XXX_Size

func (m *SignOutReq) XXX_Size() int

func (*SignOutReq) XXX_Unmarshal

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

type SignUpReq

type SignUpReq struct {
	// 账号
	Passport string `` /* 152-byte string literal not displayed */
	// 密码
	Password string `` /* 152-byte string literal not displayed */
	// 昵称
	Nickname             string   `protobuf:"bytes,3,opt,name=Nickname,proto3" json:"Nickname,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

注册请求

func (*SignUpReq) Descriptor

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

func (*SignUpReq) GetNickname

func (m *SignUpReq) GetNickname() string

func (*SignUpReq) GetPassport

func (m *SignUpReq) GetPassport() string

func (*SignUpReq) GetPassword

func (m *SignUpReq) GetPassword() string

func (*SignUpReq) Marshal

func (m *SignUpReq) Marshal() (dAtA []byte, err error)

func (*SignUpReq) MarshalTo

func (m *SignUpReq) MarshalTo(dAtA []byte) (int, error)

func (*SignUpReq) MarshalToSizedBuffer

func (m *SignUpReq) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*SignUpReq) ProtoMessage

func (*SignUpReq) ProtoMessage()

func (*SignUpReq) Reset

func (m *SignUpReq) Reset()

func (*SignUpReq) Size

func (m *SignUpReq) Size() (n int)

func (*SignUpReq) String

func (m *SignUpReq) String() string

func (*SignUpReq) Unmarshal

func (m *SignUpReq) Unmarshal(dAtA []byte) error

func (*SignUpReq) XXX_DiscardUnknown

func (m *SignUpReq) XXX_DiscardUnknown()

func (*SignUpReq) XXX_Marshal

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

func (*SignUpReq) XXX_Merge

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

func (*SignUpReq) XXX_Size

func (m *SignUpReq) XXX_Size() int

func (*SignUpReq) XXX_Unmarshal

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

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer can be embedded to have forward compatible implementations.

func (*UnimplementedUserServer) CheckNickName

func (*UnimplementedUserServer) CheckPassport

func (*UnimplementedUserServer) GetSession

func (*UnimplementedUserServer) GetUser

func (*UnimplementedUserServer) SignIn

func (*UnimplementedUserServer) SignOut

func (*UnimplementedUserServer) SignUp

type UserClient

type UserClient interface {
	// 注册
	SignUp(ctx context.Context, in *SignUpReq, opts ...grpc.CallOption) (*NullRes, error)
	// 登录
	SignIn(ctx context.Context, in *SignInReq, opts ...grpc.CallOption) (*SignInRes, error)
	// 注销
	SignOut(ctx context.Context, in *SignOutReq, opts ...grpc.CallOption) (*NullRes, error)
	// 查询账号是否可用(唯一性)
	CheckPassport(ctx context.Context, in *CheckPassportReq, opts ...grpc.CallOption) (*CheckPassportRes, error)
	// 查询昵称是否可用(唯一性)
	CheckNickName(ctx context.Context, in *CheckNickNameReq, opts ...grpc.CallOption) (*CheckNickNameRes, error)
	// 获取指定Session信息
	GetSession(ctx context.Context, in *GetSessionReq, opts ...grpc.CallOption) (*GetSessionRes, error)
	// 查询指定用户信息
	GetUser(ctx context.Context, in *GetUserReq, opts ...grpc.CallOption) (*GetUserRes, 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 UserServer

type UserServer interface {
	// 注册
	SignUp(context.Context, *SignUpReq) (*NullRes, error)
	// 登录
	SignIn(context.Context, *SignInReq) (*SignInRes, error)
	// 注销
	SignOut(context.Context, *SignOutReq) (*NullRes, error)
	// 查询账号是否可用(唯一性)
	CheckPassport(context.Context, *CheckPassportReq) (*CheckPassportRes, error)
	// 查询昵称是否可用(唯一性)
	CheckNickName(context.Context, *CheckNickNameReq) (*CheckNickNameRes, error)
	// 获取指定Session信息
	GetSession(context.Context, *GetSessionReq) (*GetSessionRes, error)
	// 查询指定用户信息
	GetUser(context.Context, *GetUserReq) (*GetUserRes, 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