proto

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	User_GetUserByMobile_FullMethodName   = "/User/GetUserByMobile"
	User_GetUserById_FullMethodName       = "/User/GetUserById"
	User_GetUserList_FullMethodName       = "/User/GetUserList"
	User_CreateUser_FullMethodName        = "/User/CreateUser"
	User_UpdateUser_FullMethodName        = "/User/UpdateUser"
	User_CheckPassWord_FullMethodName     = "/User/CheckPassWord"
	User_GetUserByIdStream_FullMethodName = "/User/GetUserByIdStream"
)

Variables

View Source
var User_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "User",
	HandlerType: (*UserServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetUserByMobile",
			Handler:    _User_GetUserByMobile_Handler,
		},
		{
			MethodName: "GetUserById",
			Handler:    _User_GetUserById_Handler,
		},
		{
			MethodName: "GetUserList",
			Handler:    _User_GetUserList_Handler,
		},
		{
			MethodName: "CreateUser",
			Handler:    _User_CreateUser_Handler,
		},
		{
			MethodName: "UpdateUser",
			Handler:    _User_UpdateUser_Handler,
		},
		{
			MethodName: "CheckPassWord",
			Handler:    _User_CheckPassWord_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "GetUserByIdStream",
			Handler:       _User_GetUserByIdStream_Handler,
			ServerStreams: true,
			ClientStreams: true,
		},
	},
	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 CheckResponse

type CheckResponse struct {
	Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	// contains filtered or unexported fields
}

func (*CheckResponse) Descriptor deprecated

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

Deprecated: Use CheckResponse.ProtoReflect.Descriptor instead.

func (*CheckResponse) GetSuccess

func (x *CheckResponse) GetSuccess() bool

func (*CheckResponse) ProtoMessage

func (*CheckResponse) ProtoMessage()

func (*CheckResponse) ProtoReflect

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

func (*CheckResponse) Reset

func (x *CheckResponse) Reset()

func (*CheckResponse) String

func (x *CheckResponse) String() string

func (*CheckResponse) Validate added in v1.3.0

func (m *CheckResponse) Validate() error

Validate checks the field values on CheckResponse 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 (*CheckResponse) ValidateAll added in v1.3.0

func (m *CheckResponse) ValidateAll() error

ValidateAll checks the field values on CheckResponse 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 CheckResponseMultiError, or nil if none found.

type CheckResponseMultiError added in v1.3.0

type CheckResponseMultiError []error

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

func (CheckResponseMultiError) AllErrors added in v1.3.0

func (m CheckResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CheckResponseMultiError) Error added in v1.3.0

func (m CheckResponseMultiError) Error() string

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

type CheckResponseValidationError added in v1.3.0

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

CheckResponseValidationError is the validation error returned by CheckResponse.Validate if the designated constraints aren't met.

func (CheckResponseValidationError) Cause added in v1.3.0

Cause function returns cause value.

func (CheckResponseValidationError) Error added in v1.3.0

Error satisfies the builtin error interface

func (CheckResponseValidationError) ErrorName added in v1.3.0

func (e CheckResponseValidationError) ErrorName() string

ErrorName returns error name.

func (CheckResponseValidationError) Field added in v1.3.0

Field function returns field value.

func (CheckResponseValidationError) Key added in v1.3.0

Key function returns key value.

func (CheckResponseValidationError) Reason added in v1.3.0

Reason function returns reason value.

type CreateUserRequest

type CreateUserRequest struct {
	Mobile   string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"`
	Passwd   string `protobuf:"bytes,2,opt,name=passwd,proto3" json:"passwd,omitempty"`
	NickName string `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateUserRequest) Descriptor deprecated

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

Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.

func (*CreateUserRequest) GetMobile

func (x *CreateUserRequest) GetMobile() string

func (*CreateUserRequest) GetNickName

func (x *CreateUserRequest) GetNickName() string

func (*CreateUserRequest) GetPasswd

func (x *CreateUserRequest) GetPasswd() string

func (*CreateUserRequest) ProtoMessage

func (*CreateUserRequest) ProtoMessage()

func (*CreateUserRequest) ProtoReflect

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

func (*CreateUserRequest) Reset

func (x *CreateUserRequest) Reset()

func (*CreateUserRequest) String

func (x *CreateUserRequest) String() string

func (*CreateUserRequest) Validate added in v1.3.0

func (m *CreateUserRequest) Validate() error

Validate checks the field values on CreateUserRequest 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 (*CreateUserRequest) ValidateAll added in v1.3.0

func (m *CreateUserRequest) ValidateAll() error

ValidateAll checks the field values on CreateUserRequest 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 CreateUserRequestMultiError, or nil if none found.

type CreateUserRequestMultiError added in v1.3.0

type CreateUserRequestMultiError []error

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

func (CreateUserRequestMultiError) AllErrors added in v1.3.0

func (m CreateUserRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (CreateUserRequestMultiError) Error added in v1.3.0

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

type CreateUserRequestValidationError added in v1.3.0

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

CreateUserRequestValidationError is the validation error returned by CreateUserRequest.Validate if the designated constraints aren't met.

func (CreateUserRequestValidationError) Cause added in v1.3.0

Cause function returns cause value.

func (CreateUserRequestValidationError) Error added in v1.3.0

Error satisfies the builtin error interface

func (CreateUserRequestValidationError) ErrorName added in v1.3.0

ErrorName returns error name.

func (CreateUserRequestValidationError) Field added in v1.3.0

Field function returns field value.

func (CreateUserRequestValidationError) Key added in v1.3.0

Key function returns key value.

func (CreateUserRequestValidationError) Reason added in v1.3.0

Reason function returns reason value.

type IdRequest

type IdRequest struct {
	Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*IdRequest) Descriptor deprecated

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

Deprecated: Use IdRequest.ProtoReflect.Descriptor instead.

func (*IdRequest) GetId

func (x *IdRequest) GetId() int64

func (*IdRequest) ProtoMessage

func (*IdRequest) ProtoMessage()

func (*IdRequest) ProtoReflect

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

func (*IdRequest) Reset

func (x *IdRequest) Reset()

func (*IdRequest) String

func (x *IdRequest) String() string

func (*IdRequest) Validate added in v1.3.0

func (m *IdRequest) Validate() error

Validate checks the field values on IdRequest 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 (*IdRequest) ValidateAll added in v1.3.0

func (m *IdRequest) ValidateAll() error

ValidateAll checks the field values on IdRequest 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 IdRequestMultiError, or nil if none found.

type IdRequestMultiError added in v1.3.0

type IdRequestMultiError []error

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

func (IdRequestMultiError) AllErrors added in v1.3.0

func (m IdRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (IdRequestMultiError) Error added in v1.3.0

func (m IdRequestMultiError) Error() string

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

type IdRequestValidationError added in v1.3.0

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

IdRequestValidationError is the validation error returned by IdRequest.Validate if the designated constraints aren't met.

func (IdRequestValidationError) Cause added in v1.3.0

func (e IdRequestValidationError) Cause() error

Cause function returns cause value.

func (IdRequestValidationError) Error added in v1.3.0

func (e IdRequestValidationError) Error() string

Error satisfies the builtin error interface

func (IdRequestValidationError) ErrorName added in v1.3.0

func (e IdRequestValidationError) ErrorName() string

ErrorName returns error name.

func (IdRequestValidationError) Field added in v1.3.0

func (e IdRequestValidationError) Field() string

Field function returns field value.

func (IdRequestValidationError) Key added in v1.3.0

Key function returns key value.

func (IdRequestValidationError) Reason added in v1.3.0

func (e IdRequestValidationError) Reason() string

Reason function returns reason value.

type MobileRequest

type MobileRequest struct {
	Mobile string `protobuf:"bytes,1,opt,name=mobile,proto3" json:"mobile,omitempty"`
	// contains filtered or unexported fields
}

func (*MobileRequest) Descriptor deprecated

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

Deprecated: Use MobileRequest.ProtoReflect.Descriptor instead.

func (*MobileRequest) GetMobile

func (x *MobileRequest) GetMobile() string

func (*MobileRequest) ProtoMessage

func (*MobileRequest) ProtoMessage()

func (*MobileRequest) ProtoReflect

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

func (*MobileRequest) Reset

func (x *MobileRequest) Reset()

func (*MobileRequest) String

func (x *MobileRequest) String() string

func (*MobileRequest) Validate added in v1.3.0

func (m *MobileRequest) Validate() error

Validate checks the field values on MobileRequest 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 (*MobileRequest) ValidateAll added in v1.3.0

func (m *MobileRequest) ValidateAll() error

ValidateAll checks the field values on MobileRequest 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 MobileRequestMultiError, or nil if none found.

type MobileRequestMultiError added in v1.3.0

type MobileRequestMultiError []error

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

func (MobileRequestMultiError) AllErrors added in v1.3.0

func (m MobileRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (MobileRequestMultiError) Error added in v1.3.0

func (m MobileRequestMultiError) Error() string

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

type MobileRequestValidationError added in v1.3.0

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

MobileRequestValidationError is the validation error returned by MobileRequest.Validate if the designated constraints aren't met.

func (MobileRequestValidationError) Cause added in v1.3.0

Cause function returns cause value.

func (MobileRequestValidationError) Error added in v1.3.0

Error satisfies the builtin error interface

func (MobileRequestValidationError) ErrorName added in v1.3.0

func (e MobileRequestValidationError) ErrorName() string

ErrorName returns error name.

func (MobileRequestValidationError) Field added in v1.3.0

Field function returns field value.

func (MobileRequestValidationError) Key added in v1.3.0

Key function returns key value.

func (MobileRequestValidationError) Reason added in v1.3.0

Reason function returns reason value.

type PageInfo

type PageInfo struct {
	Pn    int32 `protobuf:"varint,1,opt,name=pn,proto3" json:"pn,omitempty"`
	PSize int32 `protobuf:"varint,2,opt,name=pSize,proto3" json:"pSize,omitempty"`
	// contains filtered or unexported fields
}

func (*PageInfo) Descriptor deprecated

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

Deprecated: Use PageInfo.ProtoReflect.Descriptor instead.

func (*PageInfo) GetPSize

func (x *PageInfo) GetPSize() int32

func (*PageInfo) GetPn

func (x *PageInfo) GetPn() int32

func (*PageInfo) ProtoMessage

func (*PageInfo) ProtoMessage()

func (*PageInfo) ProtoReflect

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

func (*PageInfo) Reset

func (x *PageInfo) Reset()

func (*PageInfo) String

func (x *PageInfo) String() string

func (*PageInfo) Validate added in v1.3.0

func (m *PageInfo) Validate() error

Validate checks the field values on PageInfo 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 (*PageInfo) ValidateAll added in v1.3.0

func (m *PageInfo) ValidateAll() error

ValidateAll checks the field values on PageInfo 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 PageInfoMultiError, or nil if none found.

type PageInfoMultiError added in v1.3.0

type PageInfoMultiError []error

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

func (PageInfoMultiError) AllErrors added in v1.3.0

func (m PageInfoMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PageInfoMultiError) Error added in v1.3.0

func (m PageInfoMultiError) Error() string

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

type PageInfoValidationError added in v1.3.0

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

PageInfoValidationError is the validation error returned by PageInfo.Validate if the designated constraints aren't met.

func (PageInfoValidationError) Cause added in v1.3.0

func (e PageInfoValidationError) Cause() error

Cause function returns cause value.

func (PageInfoValidationError) Error added in v1.3.0

func (e PageInfoValidationError) Error() string

Error satisfies the builtin error interface

func (PageInfoValidationError) ErrorName added in v1.3.0

func (e PageInfoValidationError) ErrorName() string

ErrorName returns error name.

func (PageInfoValidationError) Field added in v1.3.0

func (e PageInfoValidationError) Field() string

Field function returns field value.

func (PageInfoValidationError) Key added in v1.3.0

func (e PageInfoValidationError) Key() bool

Key function returns key value.

func (PageInfoValidationError) Reason added in v1.3.0

func (e PageInfoValidationError) Reason() string

Reason function returns reason value.

type PasswordCheckRequest

type PasswordCheckRequest struct {
	Id       int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*PasswordCheckRequest) Descriptor deprecated

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

Deprecated: Use PasswordCheckRequest.ProtoReflect.Descriptor instead.

func (*PasswordCheckRequest) GetId

func (x *PasswordCheckRequest) GetId() int64

func (*PasswordCheckRequest) GetPassword

func (x *PasswordCheckRequest) GetPassword() string

func (*PasswordCheckRequest) ProtoMessage

func (*PasswordCheckRequest) ProtoMessage()

func (*PasswordCheckRequest) ProtoReflect

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

func (*PasswordCheckRequest) Reset

func (x *PasswordCheckRequest) Reset()

func (*PasswordCheckRequest) String

func (x *PasswordCheckRequest) String() string

func (*PasswordCheckRequest) Validate added in v1.3.0

func (m *PasswordCheckRequest) Validate() error

Validate checks the field values on PasswordCheckRequest 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 (*PasswordCheckRequest) ValidateAll added in v1.3.0

func (m *PasswordCheckRequest) ValidateAll() error

ValidateAll checks the field values on PasswordCheckRequest 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 PasswordCheckRequestMultiError, or nil if none found.

type PasswordCheckRequestMultiError added in v1.3.0

type PasswordCheckRequestMultiError []error

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

func (PasswordCheckRequestMultiError) AllErrors added in v1.3.0

func (m PasswordCheckRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (PasswordCheckRequestMultiError) Error added in v1.3.0

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

type PasswordCheckRequestValidationError added in v1.3.0

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

PasswordCheckRequestValidationError is the validation error returned by PasswordCheckRequest.Validate if the designated constraints aren't met.

func (PasswordCheckRequestValidationError) Cause added in v1.3.0

Cause function returns cause value.

func (PasswordCheckRequestValidationError) Error added in v1.3.0

Error satisfies the builtin error interface

func (PasswordCheckRequestValidationError) ErrorName added in v1.3.0

ErrorName returns error name.

func (PasswordCheckRequestValidationError) Field added in v1.3.0

Field function returns field value.

func (PasswordCheckRequestValidationError) Key added in v1.3.0

Key function returns key value.

func (PasswordCheckRequestValidationError) Reason added in v1.3.0

Reason function returns reason value.

type UnimplementedUserServer

type UnimplementedUserServer struct {
}

UnimplementedUserServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServer) CheckPassWord

func (UnimplementedUserServer) CreateUser

func (UnimplementedUserServer) GetUserById

func (UnimplementedUserServer) GetUserByIdStream added in v1.2.0

func (UnimplementedUserServer) GetUserByMobile

func (UnimplementedUserServer) GetUserList

func (UnimplementedUserServer) UpdateUser

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 UpdateUserRequest

type UpdateUserRequest struct {
	Id       int64                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	NickName string                 `protobuf:"bytes,2,opt,name=nickName,proto3" json:"nickName,omitempty"`
	Birthday *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=birthday,proto3" json:"birthday,omitempty"`
	Gender   bool                   `protobuf:"varint,4,opt,name=gender,proto3" json:"gender,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateUserRequest) Descriptor deprecated

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

Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.

func (*UpdateUserRequest) GetBirthday

func (x *UpdateUserRequest) GetBirthday() *timestamppb.Timestamp

func (*UpdateUserRequest) GetGender

func (x *UpdateUserRequest) GetGender() bool

func (*UpdateUserRequest) GetId

func (x *UpdateUserRequest) GetId() int64

func (*UpdateUserRequest) GetNickName

func (x *UpdateUserRequest) GetNickName() string

func (*UpdateUserRequest) ProtoMessage

func (*UpdateUserRequest) ProtoMessage()

func (*UpdateUserRequest) ProtoReflect

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

func (*UpdateUserRequest) Reset

func (x *UpdateUserRequest) Reset()

func (*UpdateUserRequest) String

func (x *UpdateUserRequest) String() string

func (*UpdateUserRequest) Validate added in v1.3.0

func (m *UpdateUserRequest) Validate() error

Validate checks the field values on UpdateUserRequest 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 (*UpdateUserRequest) ValidateAll added in v1.3.0

func (m *UpdateUserRequest) ValidateAll() error

ValidateAll checks the field values on UpdateUserRequest 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 UpdateUserRequestMultiError, or nil if none found.

type UpdateUserRequestMultiError added in v1.3.0

type UpdateUserRequestMultiError []error

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

func (UpdateUserRequestMultiError) AllErrors added in v1.3.0

func (m UpdateUserRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateUserRequestMultiError) Error added in v1.3.0

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

type UpdateUserRequestValidationError added in v1.3.0

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

UpdateUserRequestValidationError is the validation error returned by UpdateUserRequest.Validate if the designated constraints aren't met.

func (UpdateUserRequestValidationError) Cause added in v1.3.0

Cause function returns cause value.

func (UpdateUserRequestValidationError) Error added in v1.3.0

Error satisfies the builtin error interface

func (UpdateUserRequestValidationError) ErrorName added in v1.3.0

ErrorName returns error name.

func (UpdateUserRequestValidationError) Field added in v1.3.0

Field function returns field value.

func (UpdateUserRequestValidationError) Key added in v1.3.0

Key function returns key value.

func (UpdateUserRequestValidationError) Reason added in v1.3.0

Reason function returns reason value.

type UserClient

type UserClient interface {
	GetUserByMobile(ctx context.Context, in *MobileRequest, opts ...grpc.CallOption) (*UserInfoResponse, error)
	GetUserById(ctx context.Context, in *IdRequest, opts ...grpc.CallOption) (*UserInfoResponse, error)
	GetUserList(ctx context.Context, in *PageInfo, opts ...grpc.CallOption) (*UserListResponse, error)
	CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*UserInfoResponse, error)
	UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	CheckPassWord(ctx context.Context, in *PasswordCheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
	GetUserByIdStream(ctx context.Context, opts ...grpc.CallOption) (User_GetUserByIdStreamClient, 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 UserInfoResponse

type UserInfoResponse struct {
	Id       int64                  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Mobile   string                 `protobuf:"bytes,2,opt,name=mobile,proto3" json:"mobile,omitempty"`
	NickName string                 `protobuf:"bytes,3,opt,name=nickName,proto3" json:"nickName,omitempty"`
	Birthday *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=birthday,proto3" json:"birthday,omitempty"`
	Gender   bool                   `protobuf:"varint,5,opt,name=gender,proto3" json:"gender,omitempty"`
	RoleId   int64                  `protobuf:"varint,6,opt,name=roleId,proto3" json:"roleId,omitempty"`
	// contains filtered or unexported fields
}

func (*UserInfoResponse) Descriptor deprecated

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

Deprecated: Use UserInfoResponse.ProtoReflect.Descriptor instead.

func (*UserInfoResponse) GetBirthday

func (x *UserInfoResponse) GetBirthday() *timestamppb.Timestamp

func (*UserInfoResponse) GetGender

func (x *UserInfoResponse) GetGender() bool

func (*UserInfoResponse) GetId

func (x *UserInfoResponse) GetId() int64

func (*UserInfoResponse) GetMobile

func (x *UserInfoResponse) GetMobile() string

func (*UserInfoResponse) GetNickName

func (x *UserInfoResponse) GetNickName() string

func (*UserInfoResponse) GetRoleId

func (x *UserInfoResponse) GetRoleId() int64

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

func (*UserInfoResponse) Validate added in v1.3.0

func (m *UserInfoResponse) Validate() error

Validate checks the field values on UserInfoResponse 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 (*UserInfoResponse) ValidateAll added in v1.3.0

func (m *UserInfoResponse) ValidateAll() error

ValidateAll checks the field values on UserInfoResponse 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 UserInfoResponseMultiError, or nil if none found.

type UserInfoResponseMultiError added in v1.3.0

type UserInfoResponseMultiError []error

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

func (UserInfoResponseMultiError) AllErrors added in v1.3.0

func (m UserInfoResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserInfoResponseMultiError) Error added in v1.3.0

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

type UserInfoResponseValidationError added in v1.3.0

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

UserInfoResponseValidationError is the validation error returned by UserInfoResponse.Validate if the designated constraints aren't met.

func (UserInfoResponseValidationError) Cause added in v1.3.0

Cause function returns cause value.

func (UserInfoResponseValidationError) Error added in v1.3.0

Error satisfies the builtin error interface

func (UserInfoResponseValidationError) ErrorName added in v1.3.0

ErrorName returns error name.

func (UserInfoResponseValidationError) Field added in v1.3.0

Field function returns field value.

func (UserInfoResponseValidationError) Key added in v1.3.0

Key function returns key value.

func (UserInfoResponseValidationError) Reason added in v1.3.0

Reason function returns reason value.

type UserListResponse

type UserListResponse struct {
	Count int32               `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
	Data  []*UserInfoResponse `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*UserListResponse) Descriptor deprecated

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

Deprecated: Use UserListResponse.ProtoReflect.Descriptor instead.

func (*UserListResponse) GetCount

func (x *UserListResponse) GetCount() int32

func (*UserListResponse) GetData

func (x *UserListResponse) GetData() []*UserInfoResponse

func (*UserListResponse) ProtoMessage

func (*UserListResponse) ProtoMessage()

func (*UserListResponse) ProtoReflect

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

func (*UserListResponse) Reset

func (x *UserListResponse) Reset()

func (*UserListResponse) String

func (x *UserListResponse) String() string

func (*UserListResponse) Validate added in v1.3.0

func (m *UserListResponse) Validate() error

Validate checks the field values on UserListResponse 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 (*UserListResponse) ValidateAll added in v1.3.0

func (m *UserListResponse) ValidateAll() error

ValidateAll checks the field values on UserListResponse 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 UserListResponseMultiError, or nil if none found.

type UserListResponseMultiError added in v1.3.0

type UserListResponseMultiError []error

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

func (UserListResponseMultiError) AllErrors added in v1.3.0

func (m UserListResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UserListResponseMultiError) Error added in v1.3.0

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

type UserListResponseValidationError added in v1.3.0

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

UserListResponseValidationError is the validation error returned by UserListResponse.Validate if the designated constraints aren't met.

func (UserListResponseValidationError) Cause added in v1.3.0

Cause function returns cause value.

func (UserListResponseValidationError) Error added in v1.3.0

Error satisfies the builtin error interface

func (UserListResponseValidationError) ErrorName added in v1.3.0

ErrorName returns error name.

func (UserListResponseValidationError) Field added in v1.3.0

Field function returns field value.

func (UserListResponseValidationError) Key added in v1.3.0

Key function returns key value.

func (UserListResponseValidationError) Reason added in v1.3.0

Reason function returns reason value.

type UserServer

type UserServer interface {
	GetUserByMobile(context.Context, *MobileRequest) (*UserInfoResponse, error)
	GetUserById(context.Context, *IdRequest) (*UserInfoResponse, error)
	GetUserList(context.Context, *PageInfo) (*UserListResponse, error)
	CreateUser(context.Context, *CreateUserRequest) (*UserInfoResponse, error)
	UpdateUser(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
	CheckPassWord(context.Context, *PasswordCheckRequest) (*CheckResponse, error)
	GetUserByIdStream(User_GetUserByIdStreamServer) error
	// contains filtered or unexported methods
}

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

type User_GetUserByIdStreamClient added in v1.2.0

type User_GetUserByIdStreamClient interface {
	Send(*IdRequest) error
	Recv() (*UserInfoResponse, error)
	grpc.ClientStream
}

type User_GetUserByIdStreamServer added in v1.2.0

type User_GetUserByIdStreamServer interface {
	Send(*UserInfoResponse) error
	Recv() (*IdRequest, error)
	grpc.ServerStream
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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