user

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type BaseResp

type BaseResp struct {
	StatusCode    int32  `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"`         //状态码
	StatusMessage string `protobuf:"bytes,2,opt,name=status_message,json=statusMessage,proto3" json:"status_message,omitempty"` //状态描述
	ServiceTime   int64  `protobuf:"varint,3,opt,name=service_time,json=serviceTime,proto3" json:"service_time,omitempty"`      //服务时间
	// contains filtered or unexported fields
}

func (*BaseResp) Descriptor deprecated

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

Deprecated: Use BaseResp.ProtoReflect.Descriptor instead.

func (*BaseResp) GetServiceTime

func (x *BaseResp) GetServiceTime() int64

func (*BaseResp) GetStatusCode

func (x *BaseResp) GetStatusCode() int32

func (*BaseResp) GetStatusMessage

func (x *BaseResp) GetStatusMessage() string

func (*BaseResp) ProtoMessage

func (*BaseResp) ProtoMessage()

func (*BaseResp) ProtoReflect

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

func (*BaseResp) Reset

func (x *BaseResp) Reset()

func (*BaseResp) String

func (x *BaseResp) String() string

type CheckUserRequest

type CheckUserRequest 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 (*CheckUserRequest) Descriptor deprecated

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

Deprecated: Use CheckUserRequest.ProtoReflect.Descriptor instead.

func (*CheckUserRequest) GetPassword

func (x *CheckUserRequest) GetPassword() string

func (*CheckUserRequest) GetUsername

func (x *CheckUserRequest) GetUsername() string

func (*CheckUserRequest) ProtoMessage

func (*CheckUserRequest) ProtoMessage()

func (*CheckUserRequest) ProtoReflect

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

func (*CheckUserRequest) Reset

func (x *CheckUserRequest) Reset()

func (*CheckUserRequest) String

func (x *CheckUserRequest) String() string

type CheckUserResponse

type CheckUserResponse struct {
	BaseResp *BaseResp `protobuf:"bytes,1,opt,name=base_resp,json=baseResp,proto3" json:"base_resp,omitempty"`
	UserId   int64     `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` //用户id
	// contains filtered or unexported fields
}

func (*CheckUserResponse) Descriptor deprecated

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

Deprecated: Use CheckUserResponse.ProtoReflect.Descriptor instead.

func (*CheckUserResponse) GetBaseResp

func (x *CheckUserResponse) GetBaseResp() *BaseResp

func (*CheckUserResponse) GetUserId

func (x *CheckUserResponse) GetUserId() int64

func (*CheckUserResponse) ProtoMessage

func (*CheckUserResponse) ProtoMessage()

func (*CheckUserResponse) ProtoReflect

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

func (*CheckUserResponse) Reset

func (x *CheckUserResponse) Reset()

func (*CheckUserResponse) String

func (x *CheckUserResponse) String() string

type RegisterUserRequest

type RegisterUserRequest struct {
	Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` //注册用户名,最长32个字符
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` //密码,最长32个字符
	// contains filtered or unexported fields
}

func (*RegisterUserRequest) Descriptor deprecated

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

Deprecated: Use RegisterUserRequest.ProtoReflect.Descriptor instead.

func (*RegisterUserRequest) GetPassword

func (x *RegisterUserRequest) GetPassword() string

func (*RegisterUserRequest) GetUsername

func (x *RegisterUserRequest) GetUsername() string

func (*RegisterUserRequest) ProtoMessage

func (*RegisterUserRequest) ProtoMessage()

func (*RegisterUserRequest) ProtoReflect

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

func (*RegisterUserRequest) Reset

func (x *RegisterUserRequest) Reset()

func (*RegisterUserRequest) String

func (x *RegisterUserRequest) String() string

type RegisterUserResponse

type RegisterUserResponse struct {
	BaseResp *BaseResp `protobuf:"bytes,1,opt,name=base_resp,json=baseResp,proto3" json:"base_resp,omitempty"`
	UserId   int64     `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` //用户id
	Token    string    `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"`                  //用户鉴权token
	// contains filtered or unexported fields
}

func (*RegisterUserResponse) Descriptor deprecated

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

Deprecated: Use RegisterUserResponse.ProtoReflect.Descriptor instead.

func (*RegisterUserResponse) GetBaseResp

func (x *RegisterUserResponse) GetBaseResp() *BaseResp

func (*RegisterUserResponse) GetToken

func (x *RegisterUserResponse) GetToken() string

func (*RegisterUserResponse) GetUserId

func (x *RegisterUserResponse) GetUserId() int64

func (*RegisterUserResponse) ProtoMessage

func (*RegisterUserResponse) ProtoMessage()

func (*RegisterUserResponse) ProtoReflect

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

func (*RegisterUserResponse) Reset

func (x *RegisterUserResponse) Reset()

func (*RegisterUserResponse) String

func (x *RegisterUserResponse) String() string

type User

type User struct {
	Id            int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`                                            //用户id
	Name          string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`                                         //用户名称
	FollowCount   int64  `protobuf:"varint,3,opt,name=follow_count,json=followCount,proto3" json:"follow_count,omitempty"`       //关注总数
	FollowerCount int64  `protobuf:"varint,4,opt,name=follower_count,json=followerCount,proto3" json:"follower_count,omitempty"` //粉丝总数
	IsFollow      bool   `protobuf:"varint,5,opt,name=is_follow,json=isFollow,proto3" json:"is_follow,omitempty"`                //true-已关注,false-未关注
	// contains filtered or unexported fields
}

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetFollowCount

func (x *User) GetFollowCount() int64

func (*User) GetFollowerCount

func (x *User) GetFollowerCount() int64

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetIsFollow

func (x *User) GetIsFollow() bool

func (*User) GetName

func (x *User) GetName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

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

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

type UserInfoRequest

type UserInfoRequest struct {
	UserId int64  `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` //用户id
	Token  string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`                  //用户鉴权token
	// contains filtered or unexported fields
}

func (*UserInfoRequest) Descriptor deprecated

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

Deprecated: Use UserInfoRequest.ProtoReflect.Descriptor instead.

func (*UserInfoRequest) GetToken

func (x *UserInfoRequest) GetToken() string

func (*UserInfoRequest) GetUserId

func (x *UserInfoRequest) GetUserId() int64

func (*UserInfoRequest) ProtoMessage

func (*UserInfoRequest) ProtoMessage()

func (*UserInfoRequest) ProtoReflect

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

func (*UserInfoRequest) Reset

func (x *UserInfoRequest) Reset()

func (*UserInfoRequest) String

func (x *UserInfoRequest) String() string

type UserInfoResponse

type UserInfoResponse struct {
	BaseResp *BaseResp `protobuf:"bytes,1,opt,name=base_resp,json=baseResp,proto3" json:"base_resp,omitempty"`
	User     *User     `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` //用户信息
	// contains filtered or unexported fields
}

func (*UserInfoResponse) Descriptor deprecated

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

Deprecated: Use UserInfoResponse.ProtoReflect.Descriptor instead.

func (*UserInfoResponse) GetBaseResp

func (x *UserInfoResponse) GetBaseResp() *BaseResp

func (*UserInfoResponse) GetUser

func (x *UserInfoResponse) GetUser() *User

func (*UserInfoResponse) ProtoMessage

func (*UserInfoResponse) ProtoMessage()

func (*UserInfoResponse) ProtoReflect

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

func (*UserInfoResponse) Reset

func (x *UserInfoResponse) Reset()

func (*UserInfoResponse) String

func (x *UserInfoResponse) String() string

type UserService

type UserService interface {
	CheckUser(ctx context.Context, req *CheckUserRequest) (res *CheckUserResponse, err error)
	RegisterUser(ctx context.Context, req *RegisterUserRequest) (res *RegisterUserResponse, err error)
	UserInfo(ctx context.Context, req *UserInfoRequest) (res *UserInfoResponse, err error)
}

Directories

Path Synopsis
Code generated by Kitex v0.3.2.
Code generated by Kitex v0.3.2.

Jump to

Keyboard shortcuts

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