Documentation
¶
Index ¶
- Variables
- func NewCustomerServiceHandler(srv CustomerServiceHandler, opts ...http1.HandleOption) http.Handler
- func RegisterCustomerServiceServer(s grpc.ServiceRegistrar, srv CustomerServiceServer)
- type CaptchaReq
- func (*CaptchaReq) Descriptor() ([]byte, []int)deprecated
- func (x *CaptchaReq) GetCaptcha() string
- func (x *CaptchaReq) GetChallenge() string
- func (x *CaptchaReq) GetTk() string
- func (x *CaptchaReq) GetTo() string
- func (*CaptchaReq) ProtoMessage()
- func (x *CaptchaReq) ProtoReflect() protoreflect.Message
- func (x *CaptchaReq) Reset()
- func (x *CaptchaReq) String() string
- type Customer
- func (*Customer) Descriptor() ([]byte, []int)deprecated
- func (x *Customer) GetAccount() string
- func (x *Customer) GetAvatar() string
- func (x *Customer) GetBirthday() *timestamppb.Timestamp
- func (x *Customer) GetCreateTime() *timestamppb.Timestamp
- func (x *Customer) GetEmail() string
- func (x *Customer) GetId() int64
- func (x *Customer) GetIdCard() string
- func (x *Customer) GetLastIp() string
- func (x *Customer) GetLastTime() *timestamppb.Timestamp
- func (x *Customer) GetMobile() string
- func (x *Customer) GetName() string
- func (x *Customer) GetNickName() string
- func (x *Customer) GetRole() string
- func (x *Customer) GetSex() string
- func (x *Customer) GetUpdateTime() *timestamppb.Timestamp
- func (x *Customer) GetUuid() string
- func (*Customer) ProtoMessage()
- func (x *Customer) ProtoReflect() protoreflect.Message
- func (x *Customer) Reset()
- func (x *Customer) String() string
- type CustomerDeleteOption
- func (*CustomerDeleteOption) Descriptor() ([]byte, []int)deprecated
- func (x *CustomerDeleteOption) GetIds() []int64
- func (*CustomerDeleteOption) ProtoMessage()
- func (x *CustomerDeleteOption) ProtoReflect() protoreflect.Message
- func (x *CustomerDeleteOption) Reset()
- func (x *CustomerDeleteOption) String() string
- type CustomerGetOption
- type CustomerList
- type CustomerListOption
- func (*CustomerListOption) Descriptor() ([]byte, []int)deprecated
- func (x *CustomerListOption) GetCreateTime() string
- func (x *CustomerListOption) GetEmail() string
- func (x *CustomerListOption) GetIdCard() string
- func (x *CustomerListOption) GetKeyword() string
- func (x *CustomerListOption) GetMobile() string
- func (x *CustomerListOption) GetName() string
- func (x *CustomerListOption) GetPage() uint32
- func (x *CustomerListOption) GetPageSize() uint32
- func (x *CustomerListOption) GetSex() string
- func (x *CustomerListOption) GetTag() string
- func (*CustomerListOption) ProtoMessage()
- func (x *CustomerListOption) ProtoReflect() protoreflect.Message
- func (x *CustomerListOption) Reset()
- func (x *CustomerListOption) String() string
- type CustomerLogin
- func (*CustomerLogin) Descriptor() ([]byte, []int)deprecated
- func (x *CustomerLogin) GetAccount() string
- func (x *CustomerLogin) GetCaptcha() string
- func (x *CustomerLogin) GetCode() string
- func (x *CustomerLogin) GetPassword() string
- func (*CustomerLogin) ProtoMessage()
- func (x *CustomerLogin) ProtoReflect() protoreflect.Message
- func (x *CustomerLogin) Reset()
- func (x *CustomerLogin) String() string
- type CustomerLoginRes
- func (*CustomerLoginRes) Descriptor() ([]byte, []int)deprecated
- func (x *CustomerLoginRes) GetCustomer() *Customer
- func (x *CustomerLoginRes) GetExpirationTime() int64
- func (x *CustomerLoginRes) GetRole() string
- func (x *CustomerLoginRes) GetToken() string
- func (*CustomerLoginRes) ProtoMessage()
- func (x *CustomerLoginRes) ProtoReflect() protoreflect.Message
- func (x *CustomerLoginRes) Reset()
- func (x *CustomerLoginRes) String() string
- type CustomerOption
- func (*CustomerOption) Descriptor() ([]byte, []int)deprecated
- func (x *CustomerOption) GetAccount() string
- func (x *CustomerOption) GetAvatar() string
- func (x *CustomerOption) GetBirthday() *timestamppb.Timestamp
- func (x *CustomerOption) GetEmail() string
- func (x *CustomerOption) GetId() int64
- func (x *CustomerOption) GetIdCard() string
- func (x *CustomerOption) GetMobile() string
- func (x *CustomerOption) GetName() string
- func (x *CustomerOption) GetNickName() string
- func (x *CustomerOption) GetPassword() string
- func (x *CustomerOption) GetRole() string
- func (x *CustomerOption) GetSex() string
- func (*CustomerOption) ProtoMessage()
- func (x *CustomerOption) ProtoReflect() protoreflect.Message
- func (x *CustomerOption) Reset()
- func (x *CustomerOption) String() string
- type CustomerServiceClient
- type CustomerServiceHandler
- type CustomerServiceServer
- type UnimplementedCustomerServiceServer
- func (UnimplementedCustomerServiceServer) Captcha(context.Context, *CaptchaReq) (*comm.NullReply, error)
- func (UnimplementedCustomerServiceServer) Get(context.Context, *CustomerGetOption) (*Customer, error)
- func (UnimplementedCustomerServiceServer) List(context.Context, *CustomerListOption) (*CustomerList, error)
- func (UnimplementedCustomerServiceServer) Login(context.Context, *CustomerLogin) (*CustomerLoginRes, error)
- func (UnimplementedCustomerServiceServer) LoginForCode(context.Context, *CustomerLogin) (*CustomerLoginRes, error)
- func (UnimplementedCustomerServiceServer) Logout(context.Context, *comm.NullReq) (*comm.NullReply, error)
- func (UnimplementedCustomerServiceServer) Update(context.Context, *CustomerOption) (*Customer, error)
- func (UnimplementedCustomerServiceServer) UserInfo(context.Context, *comm.NullReq) (*Customer, error)
- type UnsafeCustomerServiceServer
Constants ¶
This section is empty.
Variables ¶
var CustomerService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "users.v1.CustomerService", HandlerType: (*CustomerServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _CustomerService_Login_Handler, }, { MethodName: "LoginForCode", Handler: _CustomerService_LoginForCode_Handler, }, { MethodName: "Logout", Handler: _CustomerService_Logout_Handler, }, { MethodName: "UserInfo", Handler: _CustomerService_UserInfo_Handler, }, { MethodName: "Captcha", Handler: _CustomerService_Captcha_Handler, }, { MethodName: "List", Handler: _CustomerService_List_Handler, }, { MethodName: "Get", Handler: _CustomerService_Get_Handler, }, { MethodName: "Update", Handler: _CustomerService_Update_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/users/v1/customer.proto", }
CustomerService_ServiceDesc is the grpc.ServiceDesc for CustomerService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_users_v1_customer_proto protoreflect.FileDescriptor
Functions ¶
func NewCustomerServiceHandler ¶
func NewCustomerServiceHandler(srv CustomerServiceHandler, opts ...http1.HandleOption) http.Handler
func RegisterCustomerServiceServer ¶
func RegisterCustomerServiceServer(s grpc.ServiceRegistrar, srv CustomerServiceServer)
Types ¶
type CaptchaReq ¶
type CaptchaReq struct { //接收对象 email To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"` //本地验证码 Captcha string `protobuf:"bytes,2,opt,name=captcha,proto3" json:"captcha,omitempty"` //极验预留 Challenge string `protobuf:"bytes,3,opt,name=challenge,proto3" json:"challenge,omitempty"` //极验预留 Tk string `protobuf:"bytes,4,opt,name=tk,proto3" json:"tk,omitempty"` // contains filtered or unexported fields }
短信验证码
func (*CaptchaReq) Descriptor
deprecated
func (*CaptchaReq) Descriptor() ([]byte, []int)
Deprecated: Use CaptchaReq.ProtoReflect.Descriptor instead.
func (*CaptchaReq) GetCaptcha ¶
func (x *CaptchaReq) GetCaptcha() string
func (*CaptchaReq) GetChallenge ¶
func (x *CaptchaReq) GetChallenge() string
func (*CaptchaReq) GetTk ¶
func (x *CaptchaReq) GetTk() string
func (*CaptchaReq) GetTo ¶
func (x *CaptchaReq) GetTo() string
func (*CaptchaReq) ProtoMessage ¶
func (*CaptchaReq) ProtoMessage()
func (*CaptchaReq) ProtoReflect ¶
func (x *CaptchaReq) ProtoReflect() protoreflect.Message
func (*CaptchaReq) Reset ¶
func (x *CaptchaReq) Reset()
func (*CaptchaReq) String ¶
func (x *CaptchaReq) String() string
type Customer ¶
type Customer struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Uuid string `protobuf:"bytes,2,opt,name=uuid,proto3" json:"uuid,omitempty"` // 姓名 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` // 账户 Account string `protobuf:"bytes,4,opt,name=account,proto3" json:"account,omitempty"` // 昵称 NickName string `protobuf:"bytes,5,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"` // 角色 Role string `protobuf:"bytes,6,opt,name=role,proto3" json:"role,omitempty"` // 邮箱 Email string `protobuf:"bytes,7,opt,name=email,proto3" json:"email,omitempty"` // 手机 Mobile string `protobuf:"bytes,8,opt,name=mobile,proto3" json:"mobile,omitempty"` // 身份证 IdCard string `protobuf:"bytes,9,opt,name=id_card,json=idCard,proto3" json:"id_card,omitempty"` // 性别 Sex string `protobuf:"bytes,11,opt,name=sex,proto3" json:"sex,omitempty"` //生日 Birthday *timestamppb.Timestamp `protobuf:"bytes,12,opt,name=birthday,proto3" json:"birthday,omitempty"` //最后登录ip LastIp string `protobuf:"bytes,13,opt,name=last_ip,json=lastIp,proto3" json:"last_ip,omitempty"` //最后登录时间 LastTime *timestamppb.Timestamp `protobuf:"bytes,14,opt,name=last_time,json=lastTime,proto3" json:"last_time,omitempty"` //创建时间 CreateTime *timestamppb.Timestamp `protobuf:"bytes,15,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` //更新时间 UpdateTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"` //头像 Avatar string `protobuf:"bytes,17,opt,name=avatar,proto3" json:"avatar,omitempty"` // contains filtered or unexported fields }
用户信息
func (*Customer) Descriptor
deprecated
func (*Customer) GetAccount ¶
func (*Customer) GetBirthday ¶
func (x *Customer) GetBirthday() *timestamppb.Timestamp
func (*Customer) GetCreateTime ¶
func (x *Customer) GetCreateTime() *timestamppb.Timestamp
func (*Customer) GetLastTime ¶
func (x *Customer) GetLastTime() *timestamppb.Timestamp
func (*Customer) GetNickName ¶
func (*Customer) GetUpdateTime ¶
func (x *Customer) GetUpdateTime() *timestamppb.Timestamp
func (*Customer) ProtoMessage ¶
func (*Customer) ProtoMessage()
func (*Customer) ProtoReflect ¶
func (x *Customer) ProtoReflect() protoreflect.Message
type CustomerDeleteOption ¶
type CustomerDeleteOption struct { Ids []int64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*CustomerDeleteOption) Descriptor
deprecated
func (*CustomerDeleteOption) Descriptor() ([]byte, []int)
Deprecated: Use CustomerDeleteOption.ProtoReflect.Descriptor instead.
func (*CustomerDeleteOption) GetIds ¶
func (x *CustomerDeleteOption) GetIds() []int64
func (*CustomerDeleteOption) ProtoMessage ¶
func (*CustomerDeleteOption) ProtoMessage()
func (*CustomerDeleteOption) ProtoReflect ¶
func (x *CustomerDeleteOption) ProtoReflect() protoreflect.Message
func (*CustomerDeleteOption) Reset ¶
func (x *CustomerDeleteOption) Reset()
func (*CustomerDeleteOption) String ¶
func (x *CustomerDeleteOption) String() string
type CustomerGetOption ¶
type CustomerGetOption struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CustomerGetOption) Descriptor
deprecated
func (*CustomerGetOption) Descriptor() ([]byte, []int)
Deprecated: Use CustomerGetOption.ProtoReflect.Descriptor instead.
func (*CustomerGetOption) GetId ¶
func (x *CustomerGetOption) GetId() int64
func (*CustomerGetOption) ProtoMessage ¶
func (*CustomerGetOption) ProtoMessage()
func (*CustomerGetOption) ProtoReflect ¶
func (x *CustomerGetOption) ProtoReflect() protoreflect.Message
func (*CustomerGetOption) Reset ¶
func (x *CustomerGetOption) Reset()
func (*CustomerGetOption) String ¶
func (x *CustomerGetOption) String() string
type CustomerList ¶
type CustomerList struct { //用户列表 List []*Customer `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"` // contains filtered or unexported fields }
func (*CustomerList) Descriptor
deprecated
func (*CustomerList) Descriptor() ([]byte, []int)
Deprecated: Use CustomerList.ProtoReflect.Descriptor instead.
func (*CustomerList) GetList ¶
func (x *CustomerList) GetList() []*Customer
func (*CustomerList) ProtoMessage ¶
func (*CustomerList) ProtoMessage()
func (*CustomerList) ProtoReflect ¶
func (x *CustomerList) ProtoReflect() protoreflect.Message
func (*CustomerList) Reset ¶
func (x *CustomerList) Reset()
func (*CustomerList) String ¶
func (x *CustomerList) String() string
type CustomerListOption ¶
type CustomerListOption struct { //名称昵称筛选 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` //标签筛选 Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"` //邮箱筛选 Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` //手机筛选 Mobile string `protobuf:"bytes,4,opt,name=mobile,proto3" json:"mobile,omitempty"` //性别筛选 Sex string `protobuf:"bytes,5,opt,name=sex,proto3" json:"sex,omitempty"` //身份证号 IdCard string `protobuf:"bytes,6,opt,name=id_card,json=idCard,proto3" json:"id_card,omitempty"` //快速搜索 Keyword string `protobuf:"bytes,7,opt,name=keyword,proto3" json:"keyword,omitempty"` //创建时间筛选 CreateTime string `protobuf:"bytes,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` Page uint32 `protobuf:"varint,10,opt,name=page,proto3" json:"page,omitempty"` PageSize uint32 `protobuf:"varint,11,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // contains filtered or unexported fields }
func (*CustomerListOption) Descriptor
deprecated
func (*CustomerListOption) Descriptor() ([]byte, []int)
Deprecated: Use CustomerListOption.ProtoReflect.Descriptor instead.
func (*CustomerListOption) GetCreateTime ¶
func (x *CustomerListOption) GetCreateTime() string
func (*CustomerListOption) GetEmail ¶
func (x *CustomerListOption) GetEmail() string
func (*CustomerListOption) GetIdCard ¶
func (x *CustomerListOption) GetIdCard() string
func (*CustomerListOption) GetKeyword ¶
func (x *CustomerListOption) GetKeyword() string
func (*CustomerListOption) GetMobile ¶
func (x *CustomerListOption) GetMobile() string
func (*CustomerListOption) GetName ¶
func (x *CustomerListOption) GetName() string
func (*CustomerListOption) GetPage ¶
func (x *CustomerListOption) GetPage() uint32
func (*CustomerListOption) GetPageSize ¶
func (x *CustomerListOption) GetPageSize() uint32
func (*CustomerListOption) GetSex ¶
func (x *CustomerListOption) GetSex() string
func (*CustomerListOption) GetTag ¶
func (x *CustomerListOption) GetTag() string
func (*CustomerListOption) ProtoMessage ¶
func (*CustomerListOption) ProtoMessage()
func (*CustomerListOption) ProtoReflect ¶
func (x *CustomerListOption) ProtoReflect() protoreflect.Message
func (*CustomerListOption) Reset ¶
func (x *CustomerListOption) Reset()
func (*CustomerListOption) String ¶
func (x *CustomerListOption) String() string
type CustomerLogin ¶
type CustomerLogin struct { // 账户 Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` // 密码 Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // 验证码 Captcha string `protobuf:"bytes,3,opt,name=captcha,proto3" json:"captcha,omitempty"` // 短信、邮箱 验证码 Code string `protobuf:"bytes,4,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
用户登录
func (*CustomerLogin) Descriptor
deprecated
func (*CustomerLogin) Descriptor() ([]byte, []int)
Deprecated: Use CustomerLogin.ProtoReflect.Descriptor instead.
func (*CustomerLogin) GetAccount ¶
func (x *CustomerLogin) GetAccount() string
func (*CustomerLogin) GetCaptcha ¶
func (x *CustomerLogin) GetCaptcha() string
func (*CustomerLogin) GetCode ¶
func (x *CustomerLogin) GetCode() string
func (*CustomerLogin) GetPassword ¶
func (x *CustomerLogin) GetPassword() string
func (*CustomerLogin) ProtoMessage ¶
func (*CustomerLogin) ProtoMessage()
func (*CustomerLogin) ProtoReflect ¶
func (x *CustomerLogin) ProtoReflect() protoreflect.Message
func (*CustomerLogin) Reset ¶
func (x *CustomerLogin) Reset()
func (*CustomerLogin) String ¶
func (x *CustomerLogin) String() string
type CustomerLoginRes ¶
type CustomerLoginRes struct { // jwt token Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // 角色 Role string `protobuf:"bytes,2,opt,name=role,proto3" json:"role,omitempty"` // 过期时间 字符串时间戳 ExpirationTime int64 `protobuf:"varint,3,opt,name=expiration_time,json=expirationTime,proto3" json:"expiration_time,omitempty"` // 用户信息 Customer *Customer `protobuf:"bytes,4,opt,name=customer,proto3" json:"customer,omitempty"` // contains filtered or unexported fields }
登录返回
func (*CustomerLoginRes) Descriptor
deprecated
func (*CustomerLoginRes) Descriptor() ([]byte, []int)
Deprecated: Use CustomerLoginRes.ProtoReflect.Descriptor instead.
func (*CustomerLoginRes) GetCustomer ¶
func (x *CustomerLoginRes) GetCustomer() *Customer
func (*CustomerLoginRes) GetExpirationTime ¶
func (x *CustomerLoginRes) GetExpirationTime() int64
func (*CustomerLoginRes) GetRole ¶
func (x *CustomerLoginRes) GetRole() string
func (*CustomerLoginRes) GetToken ¶
func (x *CustomerLoginRes) GetToken() string
func (*CustomerLoginRes) ProtoMessage ¶
func (*CustomerLoginRes) ProtoMessage()
func (*CustomerLoginRes) ProtoReflect ¶
func (x *CustomerLoginRes) ProtoReflect() protoreflect.Message
func (*CustomerLoginRes) Reset ¶
func (x *CustomerLoginRes) Reset()
func (*CustomerLoginRes) String ¶
func (x *CustomerLoginRes) String() string
type CustomerOption ¶
type CustomerOption struct { // 姓名 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // 账户 Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` // 昵称 NickName string `protobuf:"bytes,4,opt,name=nick_name,json=nickName,proto3" json:"nick_name,omitempty"` // 角色 Role string `protobuf:"bytes,5,opt,name=role,proto3" json:"role,omitempty"` // 邮箱 Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` // 手机 Mobile string `protobuf:"bytes,7,opt,name=mobile,proto3" json:"mobile,omitempty"` // 身份证 IdCard string `protobuf:"bytes,8,opt,name=id_card,json=idCard,proto3" json:"id_card,omitempty"` // 密码 Password string `protobuf:"bytes,9,opt,name=password,proto3" json:"password,omitempty"` // 性别 Sex string `protobuf:"bytes,10,opt,name=sex,proto3" json:"sex,omitempty"` // 生日 Birthday *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=birthday,proto3" json:"birthday,omitempty"` // id Id int64 `protobuf:"varint,12,opt,name=id,proto3" json:"id,omitempty"` // 头像 Avatar string `protobuf:"bytes,13,opt,name=avatar,proto3" json:"avatar,omitempty"` // contains filtered or unexported fields }
func (*CustomerOption) Descriptor
deprecated
func (*CustomerOption) Descriptor() ([]byte, []int)
Deprecated: Use CustomerOption.ProtoReflect.Descriptor instead.
func (*CustomerOption) GetAccount ¶
func (x *CustomerOption) GetAccount() string
func (*CustomerOption) GetAvatar ¶
func (x *CustomerOption) GetAvatar() string
func (*CustomerOption) GetBirthday ¶
func (x *CustomerOption) GetBirthday() *timestamppb.Timestamp
func (*CustomerOption) GetEmail ¶
func (x *CustomerOption) GetEmail() string
func (*CustomerOption) GetId ¶
func (x *CustomerOption) GetId() int64
func (*CustomerOption) GetIdCard ¶
func (x *CustomerOption) GetIdCard() string
func (*CustomerOption) GetMobile ¶
func (x *CustomerOption) GetMobile() string
func (*CustomerOption) GetName ¶
func (x *CustomerOption) GetName() string
func (*CustomerOption) GetNickName ¶
func (x *CustomerOption) GetNickName() string
func (*CustomerOption) GetPassword ¶
func (x *CustomerOption) GetPassword() string
func (*CustomerOption) GetRole ¶
func (x *CustomerOption) GetRole() string
func (*CustomerOption) GetSex ¶
func (x *CustomerOption) GetSex() string
func (*CustomerOption) ProtoMessage ¶
func (*CustomerOption) ProtoMessage()
func (*CustomerOption) ProtoReflect ¶
func (x *CustomerOption) ProtoReflect() protoreflect.Message
func (*CustomerOption) Reset ¶
func (x *CustomerOption) Reset()
func (*CustomerOption) String ¶
func (x *CustomerOption) String() string
type CustomerServiceClient ¶
type CustomerServiceClient interface { //常规账户登录接口 Login(ctx context.Context, in *CustomerLogin, opts ...grpc.CallOption) (*CustomerLoginRes, error) //验证码登录 LoginForCode(ctx context.Context, in *CustomerLogin, opts ...grpc.CallOption) (*CustomerLoginRes, error) //登出 Logout(ctx context.Context, in *comm.NullReq, opts ...grpc.CallOption) (*comm.NullReply, error) //当前登录用户信息 UserInfo(ctx context.Context, in *comm.NullReq, opts ...grpc.CallOption) (*Customer, error) //发送短信/邮箱验证码 Captcha(ctx context.Context, in *CaptchaReq, opts ...grpc.CallOption) (*comm.NullReply, error) //账户列表 List(ctx context.Context, in *CustomerListOption, opts ...grpc.CallOption) (*CustomerList, error) //获取账户信息 Get(ctx context.Context, in *CustomerGetOption, opts ...grpc.CallOption) (*Customer, error) //更新用户信息 Update(ctx context.Context, in *CustomerOption, opts ...grpc.CallOption) (*Customer, error) }
CustomerServiceClient is the client API for CustomerService 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 NewCustomerServiceClient ¶
func NewCustomerServiceClient(cc grpc.ClientConnInterface) CustomerServiceClient
type CustomerServiceHandler ¶
type CustomerServiceHandler interface { Captcha(context.Context, *CaptchaReq) (*comm.NullReply, error) Get(context.Context, *CustomerGetOption) (*Customer, error) List(context.Context, *CustomerListOption) (*CustomerList, error) Login(context.Context, *CustomerLogin) (*CustomerLoginRes, error) LoginForCode(context.Context, *CustomerLogin) (*CustomerLoginRes, error) Logout(context.Context, *comm.NullReq) (*comm.NullReply, error) Update(context.Context, *CustomerOption) (*Customer, error) UserInfo(context.Context, *comm.NullReq) (*Customer, error) }
type CustomerServiceServer ¶
type CustomerServiceServer interface { //常规账户登录接口 Login(context.Context, *CustomerLogin) (*CustomerLoginRes, error) //验证码登录 LoginForCode(context.Context, *CustomerLogin) (*CustomerLoginRes, error) //登出 Logout(context.Context, *comm.NullReq) (*comm.NullReply, error) //当前登录用户信息 UserInfo(context.Context, *comm.NullReq) (*Customer, error) //发送短信/邮箱验证码 Captcha(context.Context, *CaptchaReq) (*comm.NullReply, error) //账户列表 List(context.Context, *CustomerListOption) (*CustomerList, error) //获取账户信息 Get(context.Context, *CustomerGetOption) (*Customer, error) //更新用户信息 Update(context.Context, *CustomerOption) (*Customer, error) // contains filtered or unexported methods }
CustomerServiceServer is the server API for CustomerService service. All implementations must embed UnimplementedCustomerServiceServer for forward compatibility
type UnimplementedCustomerServiceServer ¶
type UnimplementedCustomerServiceServer struct { }
UnimplementedCustomerServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedCustomerServiceServer) Captcha ¶
func (UnimplementedCustomerServiceServer) Captcha(context.Context, *CaptchaReq) (*comm.NullReply, error)
func (UnimplementedCustomerServiceServer) Get ¶
func (UnimplementedCustomerServiceServer) Get(context.Context, *CustomerGetOption) (*Customer, error)
func (UnimplementedCustomerServiceServer) List ¶
func (UnimplementedCustomerServiceServer) List(context.Context, *CustomerListOption) (*CustomerList, error)
func (UnimplementedCustomerServiceServer) Login ¶
func (UnimplementedCustomerServiceServer) Login(context.Context, *CustomerLogin) (*CustomerLoginRes, error)
func (UnimplementedCustomerServiceServer) LoginForCode ¶
func (UnimplementedCustomerServiceServer) LoginForCode(context.Context, *CustomerLogin) (*CustomerLoginRes, error)
func (UnimplementedCustomerServiceServer) Update ¶
func (UnimplementedCustomerServiceServer) Update(context.Context, *CustomerOption) (*Customer, error)
type UnsafeCustomerServiceServer ¶
type UnsafeCustomerServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCustomerServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CustomerServiceServer will result in compilation errors.