v1

package
v0.0.0-...-7d1b39b Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserService_UserRegister_FullMethodName = "/user.service.v1.UserService/UserRegister"
	UserService_UserLogin_FullMethodName    = "/user.service.v1.UserService/UserLogin"
	UserService_GetUserInfo_FullMethodName  = "/user.service.v1.UserService/GetUserInfo"
	UserService_GetUserInfos_FullMethodName = "/user.service.v1.UserService/GetUserInfos"
)
View Source
const OperationUserServiceGetUserInfo = "/user.service.v1.UserService/GetUserInfo"
View Source
const OperationUserServiceUserLogin = "/user.service.v1.UserService/UserLogin"
View Source
const OperationUserServiceUserRegister = "/user.service.v1.UserService/UserRegister"

Variables

View Source
var File_user_service_v1_user_proto protoreflect.FileDescriptor
View Source
var UserService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "user.service.v1.UserService",
	HandlerType: (*UserServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UserRegister",
			Handler:    _UserService_UserRegister_Handler,
		},
		{
			MethodName: "UserLogin",
			Handler:    _UserService_UserLogin_Handler,
		},
		{
			MethodName: "GetUserInfo",
			Handler:    _UserService_GetUserInfo_Handler,
		},
		{
			MethodName: "GetUserInfos",
			Handler:    _UserService_GetUserInfos_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "user/service/v1/user.proto",
}

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

Functions

func RegisterUserServiceHTTPServer

func RegisterUserServiceHTTPServer(s *http.Server, srv UserServiceHTTPServer)

func RegisterUserServiceServer

func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)

Types

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) GetUserInfo

func (UnimplementedUserServiceServer) GetUserInfos

func (UnimplementedUserServiceServer) UserLogin

func (UnimplementedUserServiceServer) UserRegister

type UnsafeUserServiceServer

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

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

type User

type User struct {

	// 用户id
	Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// 用户名称
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// 关注总数
	FollowCount uint32 `protobuf:"varint,3,opt,name=follow_count,proto3" json:"follow_count,omitempty"`
	// 粉丝总数
	FollowerCount uint32 `protobuf:"varint,4,opt,name=follower_count,proto3" json:"follower_count,omitempty"`
	// true-已关注,false-未关注
	IsFollow bool `protobuf:"varint,5,opt,name=is_follow,proto3" json:"is_follow,omitempty"`
	// 用户头像
	Avatar string `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"`
	// 用户个人页顶部大图
	BackgroundImage string `protobuf:"bytes,7,opt,name=background_image,proto3" json:"background_image,omitempty"`
	// 个人简介
	Signature string `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty"`
	// 获赞数量
	TotalFavorited uint32 `protobuf:"varint,9,opt,name=total_favorited,proto3" json:"total_favorited,omitempty"`
	// 作品数量
	WorkCount uint32 `protobuf:"varint,10,opt,name=work_count,proto3" json:"work_count,omitempty"`
	// 点赞数量
	FavoriteCount uint32 `protobuf:"varint,11,opt,name=favorite_count,proto3" json:"favorite_count,omitempty"`
	// contains filtered or unexported fields
}

用户信息

func (*User) Descriptor deprecated

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

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAvatar

func (x *User) GetAvatar() string

func (*User) GetBackgroundImage

func (x *User) GetBackgroundImage() string

func (*User) GetFavoriteCount

func (x *User) GetFavoriteCount() uint32

func (*User) GetFollowCount

func (x *User) GetFollowCount() uint32

func (*User) GetFollowerCount

func (x *User) GetFollowerCount() uint32

func (*User) GetId

func (x *User) GetId() uint32

func (*User) GetIsFollow

func (x *User) GetIsFollow() bool

func (*User) GetName

func (x *User) GetName() string

func (*User) GetSignature

func (x *User) GetSignature() string

func (*User) GetTotalFavorited

func (x *User) GetTotalFavorited() uint32

func (*User) GetWorkCount

func (x *User) GetWorkCount() uint32

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

func (*User) Validate

func (m *User) Validate() error

Validate checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*User) ValidateAll

func (m *User) ValidateAll() error

ValidateAll checks the field values on User with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserMultiError, or nil if none found.

type UserInfoReply

type UserInfoReply struct {

	// 状态码,0-成功,其他值-失败
	StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"`
	// 返回状态描述
	StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"`
	// 用户信息
	User *User `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfoReply) Descriptor deprecated

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

Deprecated: Use UserInfoReply.ProtoReflect.Descriptor instead.

func (*UserInfoReply) GetStatusCode

func (x *UserInfoReply) GetStatusCode() int32

func (*UserInfoReply) GetStatusMsg

func (x *UserInfoReply) GetStatusMsg() string

func (*UserInfoReply) GetUser

func (x *UserInfoReply) GetUser() *User

func (*UserInfoReply) ProtoMessage

func (*UserInfoReply) ProtoMessage()

func (*UserInfoReply) ProtoReflect

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

func (*UserInfoReply) Reset

func (x *UserInfoReply) Reset()

func (*UserInfoReply) String

func (x *UserInfoReply) String() string

func (*UserInfoReply) Validate

func (m *UserInfoReply) Validate() error

Validate checks the field values on UserInfoReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UserInfoReply) ValidateAll

func (m *UserInfoReply) ValidateAll() error

ValidateAll checks the field values on UserInfoReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserInfoReplyMultiError, or nil if none found.

type UserInfoReplyMultiError

type UserInfoReplyMultiError []error

UserInfoReplyMultiError is an error wrapping multiple validation errors returned by UserInfoReply.ValidateAll() if the designated constraints aren't met.

func (UserInfoReplyMultiError) AllErrors

func (m UserInfoReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserInfoReplyMultiError) Error

func (m UserInfoReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type UserInfoReplyValidationError

type UserInfoReplyValidationError struct {
	// contains filtered or unexported fields
}

UserInfoReplyValidationError is the validation error returned by UserInfoReply.Validate if the designated constraints aren't met.

func (UserInfoReplyValidationError) Cause

Cause function returns cause value.

func (UserInfoReplyValidationError) Error

Error satisfies the builtin error interface

func (UserInfoReplyValidationError) ErrorName

func (e UserInfoReplyValidationError) ErrorName() string

ErrorName returns error name.

func (UserInfoReplyValidationError) Field

Field function returns field value.

func (UserInfoReplyValidationError) Key

Key function returns key value.

func (UserInfoReplyValidationError) Reason

Reason function returns reason value.

type UserInfoRequest

type UserInfoRequest struct {

	// 用户id
	UserId uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// 用户鉴权token
	Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"`
	// 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() uint32

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

func (*UserInfoRequest) Validate

func (m *UserInfoRequest) Validate() error

Validate checks the field values on UserInfoRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UserInfoRequest) ValidateAll

func (m *UserInfoRequest) ValidateAll() error

ValidateAll checks the field values on UserInfoRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserInfoRequestMultiError, or nil if none found.

type UserInfoRequestMultiError

type UserInfoRequestMultiError []error

UserInfoRequestMultiError is an error wrapping multiple validation errors returned by UserInfoRequest.ValidateAll() if the designated constraints aren't met.

func (UserInfoRequestMultiError) AllErrors

func (m UserInfoRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserInfoRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UserInfoRequestValidationError

type UserInfoRequestValidationError struct {
	// contains filtered or unexported fields
}

UserInfoRequestValidationError is the validation error returned by UserInfoRequest.Validate if the designated constraints aren't met.

func (UserInfoRequestValidationError) Cause

Cause function returns cause value.

func (UserInfoRequestValidationError) Error

Error satisfies the builtin error interface

func (UserInfoRequestValidationError) ErrorName

func (e UserInfoRequestValidationError) ErrorName() string

ErrorName returns error name.

func (UserInfoRequestValidationError) Field

Field function returns field value.

func (UserInfoRequestValidationError) Key

Key function returns key value.

func (UserInfoRequestValidationError) Reason

Reason function returns reason value.

type UserInfosReply

type UserInfosReply struct {

	// 用户信息列表
	Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfosReply) Descriptor deprecated

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

Deprecated: Use UserInfosReply.ProtoReflect.Descriptor instead.

func (*UserInfosReply) GetUsers

func (x *UserInfosReply) GetUsers() []*User

func (*UserInfosReply) ProtoMessage

func (*UserInfosReply) ProtoMessage()

func (*UserInfosReply) ProtoReflect

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

func (*UserInfosReply) Reset

func (x *UserInfosReply) Reset()

func (*UserInfosReply) String

func (x *UserInfosReply) String() string

func (*UserInfosReply) Validate

func (m *UserInfosReply) Validate() error

Validate checks the field values on UserInfosReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UserInfosReply) ValidateAll

func (m *UserInfosReply) ValidateAll() error

ValidateAll checks the field values on UserInfosReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserInfosReplyMultiError, or nil if none found.

type UserInfosReplyMultiError

type UserInfosReplyMultiError []error

UserInfosReplyMultiError is an error wrapping multiple validation errors returned by UserInfosReply.ValidateAll() if the designated constraints aren't met.

func (UserInfosReplyMultiError) AllErrors

func (m UserInfosReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserInfosReplyMultiError) Error

func (m UserInfosReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type UserInfosReplyValidationError

type UserInfosReplyValidationError struct {
	// contains filtered or unexported fields
}

UserInfosReplyValidationError is the validation error returned by UserInfosReply.Validate if the designated constraints aren't met.

func (UserInfosReplyValidationError) Cause

Cause function returns cause value.

func (UserInfosReplyValidationError) Error

Error satisfies the builtin error interface

func (UserInfosReplyValidationError) ErrorName

func (e UserInfosReplyValidationError) ErrorName() string

ErrorName returns error name.

func (UserInfosReplyValidationError) Field

Field function returns field value.

func (UserInfosReplyValidationError) Key

Key function returns key value.

func (UserInfosReplyValidationError) Reason

Reason function returns reason value.

type UserInfosRequest

type UserInfosRequest struct {

	// 登陆用户id
	UserId uint32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	// 用户id列表
	UserIds []uint32 `protobuf:"varint,2,rep,packed,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfosRequest) Descriptor deprecated

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

Deprecated: Use UserInfosRequest.ProtoReflect.Descriptor instead.

func (*UserInfosRequest) GetUserId

func (x *UserInfosRequest) GetUserId() uint32

func (*UserInfosRequest) GetUserIds

func (x *UserInfosRequest) GetUserIds() []uint32

func (*UserInfosRequest) ProtoMessage

func (*UserInfosRequest) ProtoMessage()

func (*UserInfosRequest) ProtoReflect

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

func (*UserInfosRequest) Reset

func (x *UserInfosRequest) Reset()

func (*UserInfosRequest) String

func (x *UserInfosRequest) String() string

func (*UserInfosRequest) Validate

func (m *UserInfosRequest) Validate() error

Validate checks the field values on UserInfosRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UserInfosRequest) ValidateAll

func (m *UserInfosRequest) ValidateAll() error

ValidateAll checks the field values on UserInfosRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserInfosRequestMultiError, or nil if none found.

type UserInfosRequestMultiError

type UserInfosRequestMultiError []error

UserInfosRequestMultiError is an error wrapping multiple validation errors returned by UserInfosRequest.ValidateAll() if the designated constraints aren't met.

func (UserInfosRequestMultiError) AllErrors

func (m UserInfosRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserInfosRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UserInfosRequestValidationError

type UserInfosRequestValidationError struct {
	// contains filtered or unexported fields
}

UserInfosRequestValidationError is the validation error returned by UserInfosRequest.Validate if the designated constraints aren't met.

func (UserInfosRequestValidationError) Cause

Cause function returns cause value.

func (UserInfosRequestValidationError) Error

Error satisfies the builtin error interface

func (UserInfosRequestValidationError) ErrorName

ErrorName returns error name.

func (UserInfosRequestValidationError) Field

Field function returns field value.

func (UserInfosRequestValidationError) Key

Key function returns key value.

func (UserInfosRequestValidationError) Reason

Reason function returns reason value.

type UserLoginReply

type UserLoginReply struct {

	// 状态码,0-成功,其他值-失败
	StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"`
	// 返回状态描述
	StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"`
	// 用户id
	UserId uint32 `protobuf:"varint,3,opt,name=user_id,proto3" json:"user_id,omitempty"`
	// 用户鉴权token
	Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*UserLoginReply) Descriptor deprecated

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

Deprecated: Use UserLoginReply.ProtoReflect.Descriptor instead.

func (*UserLoginReply) GetStatusCode

func (x *UserLoginReply) GetStatusCode() int32

func (*UserLoginReply) GetStatusMsg

func (x *UserLoginReply) GetStatusMsg() string

func (*UserLoginReply) GetToken

func (x *UserLoginReply) GetToken() string

func (*UserLoginReply) GetUserId

func (x *UserLoginReply) GetUserId() uint32

func (*UserLoginReply) ProtoMessage

func (*UserLoginReply) ProtoMessage()

func (*UserLoginReply) ProtoReflect

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

func (*UserLoginReply) Reset

func (x *UserLoginReply) Reset()

func (*UserLoginReply) String

func (x *UserLoginReply) String() string

func (*UserLoginReply) Validate

func (m *UserLoginReply) Validate() error

Validate checks the field values on UserLoginReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UserLoginReply) ValidateAll

func (m *UserLoginReply) ValidateAll() error

ValidateAll checks the field values on UserLoginReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserLoginReplyMultiError, or nil if none found.

type UserLoginReplyMultiError

type UserLoginReplyMultiError []error

UserLoginReplyMultiError is an error wrapping multiple validation errors returned by UserLoginReply.ValidateAll() if the designated constraints aren't met.

func (UserLoginReplyMultiError) AllErrors

func (m UserLoginReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserLoginReplyMultiError) Error

func (m UserLoginReplyMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type UserLoginReplyValidationError

type UserLoginReplyValidationError struct {
	// contains filtered or unexported fields
}

UserLoginReplyValidationError is the validation error returned by UserLoginReply.Validate if the designated constraints aren't met.

func (UserLoginReplyValidationError) Cause

Cause function returns cause value.

func (UserLoginReplyValidationError) Error

Error satisfies the builtin error interface

func (UserLoginReplyValidationError) ErrorName

func (e UserLoginReplyValidationError) ErrorName() string

ErrorName returns error name.

func (UserLoginReplyValidationError) Field

Field function returns field value.

func (UserLoginReplyValidationError) Key

Key function returns key value.

func (UserLoginReplyValidationError) Reason

Reason function returns reason value.

type UserLoginRequest

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

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

Deprecated: Use UserLoginRequest.ProtoReflect.Descriptor instead.

func (*UserLoginRequest) GetPassword

func (x *UserLoginRequest) GetPassword() string

func (*UserLoginRequest) GetUsername

func (x *UserLoginRequest) GetUsername() string

func (*UserLoginRequest) ProtoMessage

func (*UserLoginRequest) ProtoMessage()

func (*UserLoginRequest) ProtoReflect

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

func (*UserLoginRequest) Reset

func (x *UserLoginRequest) Reset()

func (*UserLoginRequest) String

func (x *UserLoginRequest) String() string

func (*UserLoginRequest) Validate

func (m *UserLoginRequest) Validate() error

Validate checks the field values on UserLoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UserLoginRequest) ValidateAll

func (m *UserLoginRequest) ValidateAll() error

ValidateAll checks the field values on UserLoginRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserLoginRequestMultiError, or nil if none found.

type UserLoginRequestMultiError

type UserLoginRequestMultiError []error

UserLoginRequestMultiError is an error wrapping multiple validation errors returned by UserLoginRequest.ValidateAll() if the designated constraints aren't met.

func (UserLoginRequestMultiError) AllErrors

func (m UserLoginRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserLoginRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UserLoginRequestValidationError

type UserLoginRequestValidationError struct {
	// contains filtered or unexported fields
}

UserLoginRequestValidationError is the validation error returned by UserLoginRequest.Validate if the designated constraints aren't met.

func (UserLoginRequestValidationError) Cause

Cause function returns cause value.

func (UserLoginRequestValidationError) Error

Error satisfies the builtin error interface

func (UserLoginRequestValidationError) ErrorName

ErrorName returns error name.

func (UserLoginRequestValidationError) Field

Field function returns field value.

func (UserLoginRequestValidationError) Key

Key function returns key value.

func (UserLoginRequestValidationError) Reason

Reason function returns reason value.

type UserMultiError

type UserMultiError []error

UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.

func (UserMultiError) AllErrors

func (m UserMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserMultiError) Error

func (m UserMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type UserRegisterReply

type UserRegisterReply struct {

	// 状态码,0-成功,其他值-失败
	StatusCode int32 `protobuf:"varint,1,opt,name=status_code,proto3" json:"status_code,omitempty"`
	// 返回状态描述
	StatusMsg string `protobuf:"bytes,2,opt,name=status_msg,proto3" json:"status_msg,omitempty"`
	// 用户id
	UserId uint32 `protobuf:"varint,3,opt,name=user_id,proto3" json:"user_id,omitempty"`
	// 用户鉴权token
	Token string `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"`
	// contains filtered or unexported fields
}

func (*UserRegisterReply) Descriptor deprecated

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

Deprecated: Use UserRegisterReply.ProtoReflect.Descriptor instead.

func (*UserRegisterReply) GetStatusCode

func (x *UserRegisterReply) GetStatusCode() int32

func (*UserRegisterReply) GetStatusMsg

func (x *UserRegisterReply) GetStatusMsg() string

func (*UserRegisterReply) GetToken

func (x *UserRegisterReply) GetToken() string

func (*UserRegisterReply) GetUserId

func (x *UserRegisterReply) GetUserId() uint32

func (*UserRegisterReply) ProtoMessage

func (*UserRegisterReply) ProtoMessage()

func (*UserRegisterReply) ProtoReflect

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

func (*UserRegisterReply) Reset

func (x *UserRegisterReply) Reset()

func (*UserRegisterReply) String

func (x *UserRegisterReply) String() string

func (*UserRegisterReply) Validate

func (m *UserRegisterReply) Validate() error

Validate checks the field values on UserRegisterReply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UserRegisterReply) ValidateAll

func (m *UserRegisterReply) ValidateAll() error

ValidateAll checks the field values on UserRegisterReply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserRegisterReplyMultiError, or nil if none found.

type UserRegisterReplyMultiError

type UserRegisterReplyMultiError []error

UserRegisterReplyMultiError is an error wrapping multiple validation errors returned by UserRegisterReply.ValidateAll() if the designated constraints aren't met.

func (UserRegisterReplyMultiError) AllErrors

func (m UserRegisterReplyMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserRegisterReplyMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UserRegisterReplyValidationError

type UserRegisterReplyValidationError struct {
	// contains filtered or unexported fields
}

UserRegisterReplyValidationError is the validation error returned by UserRegisterReply.Validate if the designated constraints aren't met.

func (UserRegisterReplyValidationError) Cause

Cause function returns cause value.

func (UserRegisterReplyValidationError) Error

Error satisfies the builtin error interface

func (UserRegisterReplyValidationError) ErrorName

ErrorName returns error name.

func (UserRegisterReplyValidationError) Field

Field function returns field value.

func (UserRegisterReplyValidationError) Key

Key function returns key value.

func (UserRegisterReplyValidationError) Reason

Reason function returns reason value.

type UserRegisterRequest

type UserRegisterRequest struct {

	// 注册用户名,最长32个字符
	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"`
	// contains filtered or unexported fields
}

func (*UserRegisterRequest) Descriptor deprecated

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

Deprecated: Use UserRegisterRequest.ProtoReflect.Descriptor instead.

func (*UserRegisterRequest) GetPassword

func (x *UserRegisterRequest) GetPassword() string

func (*UserRegisterRequest) GetUsername

func (x *UserRegisterRequest) GetUsername() string

func (*UserRegisterRequest) ProtoMessage

func (*UserRegisterRequest) ProtoMessage()

func (*UserRegisterRequest) ProtoReflect

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

func (*UserRegisterRequest) Reset

func (x *UserRegisterRequest) Reset()

func (*UserRegisterRequest) String

func (x *UserRegisterRequest) String() string

func (*UserRegisterRequest) Validate

func (m *UserRegisterRequest) Validate() error

Validate checks the field values on UserRegisterRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UserRegisterRequest) ValidateAll

func (m *UserRegisterRequest) ValidateAll() error

ValidateAll checks the field values on UserRegisterRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserRegisterRequestMultiError, or nil if none found.

type UserRegisterRequestMultiError

type UserRegisterRequestMultiError []error

UserRegisterRequestMultiError is an error wrapping multiple validation errors returned by UserRegisterRequest.ValidateAll() if the designated constraints aren't met.

func (UserRegisterRequestMultiError) AllErrors

func (m UserRegisterRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserRegisterRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UserRegisterRequestValidationError

type UserRegisterRequestValidationError struct {
	// contains filtered or unexported fields
}

UserRegisterRequestValidationError is the validation error returned by UserRegisterRequest.Validate if the designated constraints aren't met.

func (UserRegisterRequestValidationError) Cause

Cause function returns cause value.

func (UserRegisterRequestValidationError) Error

Error satisfies the builtin error interface

func (UserRegisterRequestValidationError) ErrorName

ErrorName returns error name.

func (UserRegisterRequestValidationError) Field

Field function returns field value.

func (UserRegisterRequestValidationError) Key

Key function returns key value.

func (UserRegisterRequestValidationError) Reason

Reason function returns reason value.

type UserServiceClient

type UserServiceClient interface {
	// 用户注册
	UserRegister(ctx context.Context, in *UserRegisterRequest, opts ...grpc.CallOption) (*UserRegisterReply, error)
	// 用户登陆
	UserLogin(ctx context.Context, in *UserLoginRequest, opts ...grpc.CallOption) (*UserLoginReply, error)
	// 用户获取自己的信息
	GetUserInfo(ctx context.Context, in *UserInfoRequest, opts ...grpc.CallOption) (*UserInfoReply, error)
	// 其他服务请求批量获取用户信息
	GetUserInfos(ctx context.Context, in *UserInfosRequest, opts ...grpc.CallOption) (*UserInfosReply, error)
}

UserServiceClient is the client API for UserService 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.

type UserServiceHTTPClient

type UserServiceHTTPClient interface {
	GetUserInfo(ctx context.Context, req *UserInfoRequest, opts ...http.CallOption) (rsp *UserInfoReply, err error)
	UserLogin(ctx context.Context, req *UserLoginRequest, opts ...http.CallOption) (rsp *UserLoginReply, err error)
	UserRegister(ctx context.Context, req *UserRegisterRequest, opts ...http.CallOption) (rsp *UserRegisterReply, err error)
}

func NewUserServiceHTTPClient

func NewUserServiceHTTPClient(client *http.Client) UserServiceHTTPClient

type UserServiceHTTPClientImpl

type UserServiceHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*UserServiceHTTPClientImpl) GetUserInfo

func (*UserServiceHTTPClientImpl) UserLogin

func (*UserServiceHTTPClientImpl) UserRegister

type UserServiceHTTPServer

type UserServiceHTTPServer interface {
	// GetUserInfo 用户获取自己的信息
	GetUserInfo(context.Context, *UserInfoRequest) (*UserInfoReply, error)
	// UserLogin 用户登陆
	UserLogin(context.Context, *UserLoginRequest) (*UserLoginReply, error)
	// UserRegister 用户注册
	UserRegister(context.Context, *UserRegisterRequest) (*UserRegisterReply, error)
}

type UserServiceServer

type UserServiceServer interface {
	// 用户注册
	UserRegister(context.Context, *UserRegisterRequest) (*UserRegisterReply, error)
	// 用户登陆
	UserLogin(context.Context, *UserLoginRequest) (*UserLoginReply, error)
	// 用户获取自己的信息
	GetUserInfo(context.Context, *UserInfoRequest) (*UserInfoReply, error)
	// 其他服务请求批量获取用户信息
	GetUserInfos(context.Context, *UserInfosRequest) (*UserInfosReply, error)
	// contains filtered or unexported methods
}

UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility

type UserValidationError

type UserValidationError struct {
	// contains filtered or unexported fields
}

UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.

func (UserValidationError) Cause

func (e UserValidationError) Cause() error

Cause function returns cause value.

func (UserValidationError) Error

func (e UserValidationError) Error() string

Error satisfies the builtin error interface

func (UserValidationError) ErrorName

func (e UserValidationError) ErrorName() string

ErrorName returns error name.

func (UserValidationError) Field

func (e UserValidationError) Field() string

Field function returns field value.

func (UserValidationError) Key

func (e UserValidationError) Key() bool

Key function returns key value.

func (UserValidationError) Reason

func (e UserValidationError) Reason() string

Reason function returns reason value.

Jump to

Keyboard shortcuts

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