// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.6.2
// - protoc             v7.35.1
// source: module/ec/mall/proto/staff.proto

package mall

import (
	context "context"
	grpc "google.golang.org/grpc"
	codes "google.golang.org/grpc/codes"
	status "google.golang.org/grpc/status"
)

// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.64.0 or later.
const _ = grpc.SupportPackageIsVersion9

const (
	Staff_Login_FullMethodName       = "/mall.Staff/Login"
	Staff_Fetch_FullMethodName       = "/mall.Staff/Fetch"
	Staff_Create_FullMethodName      = "/mall.Staff/Create"
	Staff_Delete_FullMethodName      = "/mall.Staff/Delete"
	Staff_GetProfile_FullMethodName  = "/mall.Staff/GetProfile"
	Staff_SetProfile_FullMethodName  = "/mall.Staff/SetProfile"
	Staff_SetPassword_FullMethodName = "/mall.Staff/SetPassword"
)

// StaffClient is the client API for Staff 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.
//
// Store(店铺)微服务-工作人员
type StaffClient interface {
	// 登录
	Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error)
	// 获取工作人员列表
	Fetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*StaffListReply, error)
	// 创建工作人员
	Create(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
	// 删除工作人员
	Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
	// 获取个人信息
	GetProfile(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StaffItem, error)
	// 设置个人信息
	SetProfile(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*IdentityStatusReply, error)
	// 设置账号密码
	SetPassword(ctx context.Context, in *SetAccountRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error)
}

type staffClient struct {
	cc grpc.ClientConnInterface
}

func NewStaffClient(cc grpc.ClientConnInterface) StaffClient {
	return &staffClient{cc}
}

func (c *staffClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(LoginReply)
	err := c.cc.Invoke(ctx, Staff_Login_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *staffClient) Fetch(ctx context.Context, in *MallFetchRequest, opts ...grpc.CallOption) (*StaffListReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(StaffListReply)
	err := c.cc.Invoke(ctx, Staff_Fetch_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *staffClient) Create(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(IdentityStatusReply)
	err := c.cc.Invoke(ctx, Staff_Create_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *staffClient) Delete(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(IdentityStatusReply)
	err := c.cc.Invoke(ctx, Staff_Delete_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *staffClient) GetProfile(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*StaffItem, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(StaffItem)
	err := c.cc.Invoke(ctx, Staff_GetProfile_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *staffClient) SetProfile(ctx context.Context, in *StaffItem, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(IdentityStatusReply)
	err := c.cc.Invoke(ctx, Staff_SetProfile_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

func (c *staffClient) SetPassword(ctx context.Context, in *SetAccountRequest, opts ...grpc.CallOption) (*IdentityStatusReply, error) {
	cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
	out := new(IdentityStatusReply)
	err := c.cc.Invoke(ctx, Staff_SetPassword_FullMethodName, in, out, cOpts...)
	if err != nil {
		return nil, err
	}
	return out, nil
}

// StaffServer is the server API for Staff service.
// All implementations should embed UnimplementedStaffServer
// for forward compatibility.
//
// Store(店铺)微服务-工作人员
type StaffServer interface {
	// 登录
	Login(context.Context, *LoginRequest) (*LoginReply, error)
	// 获取工作人员列表
	Fetch(context.Context, *MallFetchRequest) (*StaffListReply, error)
	// 创建工作人员
	Create(context.Context, *StaffItem) (*IdentityStatusReply, error)
	// 删除工作人员
	Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error)
	// 获取个人信息
	GetProfile(context.Context, *IdentRequest) (*StaffItem, error)
	// 设置个人信息
	SetProfile(context.Context, *StaffItem) (*IdentityStatusReply, error)
	// 设置账号密码
	SetPassword(context.Context, *SetAccountRequest) (*IdentityStatusReply, error)
}

// UnimplementedStaffServer should be embedded to have
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedStaffServer struct{}

func (UnimplementedStaffServer) Login(context.Context, *LoginRequest) (*LoginReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Login not implemented")
}
func (UnimplementedStaffServer) Fetch(context.Context, *MallFetchRequest) (*StaffListReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Fetch not implemented")
}
func (UnimplementedStaffServer) Create(context.Context, *StaffItem) (*IdentityStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedStaffServer) Delete(context.Context, *IdentRequest) (*IdentityStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedStaffServer) GetProfile(context.Context, *IdentRequest) (*StaffItem, error) {
	return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented")
}
func (UnimplementedStaffServer) SetProfile(context.Context, *StaffItem) (*IdentityStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method SetProfile not implemented")
}
func (UnimplementedStaffServer) SetPassword(context.Context, *SetAccountRequest) (*IdentityStatusReply, error) {
	return nil, status.Error(codes.Unimplemented, "method SetPassword not implemented")
}
func (UnimplementedStaffServer) testEmbeddedByValue() {}

// UnsafeStaffServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to StaffServer will
// result in compilation errors.
type UnsafeStaffServer interface {
	mustEmbedUnimplementedStaffServer()
}

func RegisterStaffServer(s grpc.ServiceRegistrar, srv StaffServer) {
	// If the following call panics, it indicates UnimplementedStaffServer was
	// embedded by pointer and is nil.  This will cause panics if an
	// unimplemented method is ever invoked, so we test this at initialization
	// time to prevent it from happening at runtime later due to I/O.
	if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
		t.testEmbeddedByValue()
	}
	s.RegisterService(&Staff_ServiceDesc, srv)
}

func _Staff_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(LoginRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StaffServer).Login(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Staff_Login_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StaffServer).Login(ctx, req.(*LoginRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Staff_Fetch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(MallFetchRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StaffServer).Fetch(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Staff_Fetch_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StaffServer).Fetch(ctx, req.(*MallFetchRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Staff_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StaffItem)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StaffServer).Create(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Staff_Create_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StaffServer).Create(ctx, req.(*StaffItem))
	}
	return interceptor(ctx, in, info, handler)
}

func _Staff_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StaffServer).Delete(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Staff_Delete_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StaffServer).Delete(ctx, req.(*IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Staff_GetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(IdentRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StaffServer).GetProfile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Staff_GetProfile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StaffServer).GetProfile(ctx, req.(*IdentRequest))
	}
	return interceptor(ctx, in, info, handler)
}

func _Staff_SetProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(StaffItem)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StaffServer).SetProfile(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Staff_SetProfile_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StaffServer).SetProfile(ctx, req.(*StaffItem))
	}
	return interceptor(ctx, in, info, handler)
}

func _Staff_SetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
	in := new(SetAccountRequest)
	if err := dec(in); err != nil {
		return nil, err
	}
	if interceptor == nil {
		return srv.(StaffServer).SetPassword(ctx, in)
	}
	info := &grpc.UnaryServerInfo{
		Server:     srv,
		FullMethod: Staff_SetPassword_FullMethodName,
	}
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
		return srv.(StaffServer).SetPassword(ctx, req.(*SetAccountRequest))
	}
	return interceptor(ctx, in, info, handler)
}

// Staff_ServiceDesc is the grpc.ServiceDesc for Staff service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Staff_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "mall.Staff",
	HandlerType: (*StaffServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Login",
			Handler:    _Staff_Login_Handler,
		},
		{
			MethodName: "Fetch",
			Handler:    _Staff_Fetch_Handler,
		},
		{
			MethodName: "Create",
			Handler:    _Staff_Create_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Staff_Delete_Handler,
		},
		{
			MethodName: "GetProfile",
			Handler:    _Staff_GetProfile_Handler,
		},
		{
			MethodName: "SetProfile",
			Handler:    _Staff_SetProfile_Handler,
		},
		{
			MethodName: "SetPassword",
			Handler:    _Staff_SetPassword_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "module/ec/mall/proto/staff.proto",
}
