1d41d7ca7e
CI / changes (push) Successful in 12s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / bff (push) Successful in 3s
CI / chore (push) Successful in 0s
CI / express (push) Successful in 0s
CI / product (push) Successful in 1s
CI / sale (push) Successful in 0s
CI / user (push) Successful in 0s
CI / wecom (push) Successful in 31s
350 lines
12 KiB
Go
350 lines
12 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc v3.19.4
|
|
// source: wecom/wecom.proto
|
|
|
|
package wecom
|
|
|
|
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 (
|
|
Wecom_ItemsUsers_FullMethodName = "/wecom.Wecom/ItemsUsers"
|
|
Wecom_CreateUser_FullMethodName = "/wecom.Wecom/CreateUser"
|
|
Wecom_UpdateUser_FullMethodName = "/wecom.Wecom/UpdateUser"
|
|
Wecom_StatusUser_FullMethodName = "/wecom.Wecom/StatusUser"
|
|
Wecom_DeleteUser_FullMethodName = "/wecom.Wecom/DeleteUser"
|
|
Wecom_ItemsAgents_FullMethodName = "/wecom.Wecom/ItemsAgents"
|
|
Wecom_Types_FullMethodName = "/wecom.Wecom/Types"
|
|
)
|
|
|
|
// WecomClient is the client API for Wecom 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 WecomClient interface {
|
|
ItemsUsers(ctx context.Context, in *ItemsUserReq, opts ...grpc.CallOption) (*Response, error)
|
|
CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*Response, error)
|
|
UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*Response, error)
|
|
StatusUser(ctx context.Context, in *StatusUserReq, opts ...grpc.CallOption) (*Response, error)
|
|
DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*Response, error)
|
|
ItemsAgents(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*Response, error)
|
|
Types(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*Response, error)
|
|
}
|
|
|
|
type wecomClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewWecomClient(cc grpc.ClientConnInterface) WecomClient {
|
|
return &wecomClient{cc}
|
|
}
|
|
|
|
func (c *wecomClient) ItemsUsers(ctx context.Context, in *ItemsUserReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Wecom_ItemsUsers_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wecomClient) CreateUser(ctx context.Context, in *CreateUserReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Wecom_CreateUser_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wecomClient) UpdateUser(ctx context.Context, in *UpdateUserReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Wecom_UpdateUser_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wecomClient) StatusUser(ctx context.Context, in *StatusUserReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Wecom_StatusUser_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wecomClient) DeleteUser(ctx context.Context, in *DeleteUserReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Wecom_DeleteUser_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wecomClient) ItemsAgents(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Wecom_ItemsAgents_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *wecomClient) Types(ctx context.Context, in *EmptyReq, opts ...grpc.CallOption) (*Response, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Response)
|
|
err := c.cc.Invoke(ctx, Wecom_Types_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// WecomServer is the server API for Wecom service.
|
|
// All implementations must embed UnimplementedWecomServer
|
|
// for forward compatibility.
|
|
type WecomServer interface {
|
|
ItemsUsers(context.Context, *ItemsUserReq) (*Response, error)
|
|
CreateUser(context.Context, *CreateUserReq) (*Response, error)
|
|
UpdateUser(context.Context, *UpdateUserReq) (*Response, error)
|
|
StatusUser(context.Context, *StatusUserReq) (*Response, error)
|
|
DeleteUser(context.Context, *DeleteUserReq) (*Response, error)
|
|
ItemsAgents(context.Context, *EmptyReq) (*Response, error)
|
|
Types(context.Context, *EmptyReq) (*Response, error)
|
|
mustEmbedUnimplementedWecomServer()
|
|
}
|
|
|
|
// UnimplementedWecomServer must 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 UnimplementedWecomServer struct{}
|
|
|
|
func (UnimplementedWecomServer) ItemsUsers(context.Context, *ItemsUserReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemsUsers not implemented")
|
|
}
|
|
func (UnimplementedWecomServer) CreateUser(context.Context, *CreateUserReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method CreateUser not implemented")
|
|
}
|
|
func (UnimplementedWecomServer) UpdateUser(context.Context, *UpdateUserReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateUser not implemented")
|
|
}
|
|
func (UnimplementedWecomServer) StatusUser(context.Context, *StatusUserReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method StatusUser not implemented")
|
|
}
|
|
func (UnimplementedWecomServer) DeleteUser(context.Context, *DeleteUserReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteUser not implemented")
|
|
}
|
|
func (UnimplementedWecomServer) ItemsAgents(context.Context, *EmptyReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ItemsAgents not implemented")
|
|
}
|
|
func (UnimplementedWecomServer) Types(context.Context, *EmptyReq) (*Response, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method Types not implemented")
|
|
}
|
|
func (UnimplementedWecomServer) mustEmbedUnimplementedWecomServer() {}
|
|
func (UnimplementedWecomServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeWecomServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to WecomServer will
|
|
// result in compilation errors.
|
|
type UnsafeWecomServer interface {
|
|
mustEmbedUnimplementedWecomServer()
|
|
}
|
|
|
|
func RegisterWecomServer(s grpc.ServiceRegistrar, srv WecomServer) {
|
|
// If the following call panics, it indicates UnimplementedWecomServer 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(&Wecom_ServiceDesc, srv)
|
|
}
|
|
|
|
func _Wecom_ItemsUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(ItemsUserReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(WecomServer).ItemsUsers(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Wecom_ItemsUsers_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(WecomServer).ItemsUsers(ctx, req.(*ItemsUserReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Wecom_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(CreateUserReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(WecomServer).CreateUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Wecom_CreateUser_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(WecomServer).CreateUser(ctx, req.(*CreateUserReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Wecom_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(UpdateUserReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(WecomServer).UpdateUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Wecom_UpdateUser_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(WecomServer).UpdateUser(ctx, req.(*UpdateUserReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Wecom_StatusUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(StatusUserReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(WecomServer).StatusUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Wecom_StatusUser_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(WecomServer).StatusUser(ctx, req.(*StatusUserReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Wecom_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(DeleteUserReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(WecomServer).DeleteUser(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Wecom_DeleteUser_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(WecomServer).DeleteUser(ctx, req.(*DeleteUserReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Wecom_ItemsAgents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(EmptyReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(WecomServer).ItemsAgents(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Wecom_ItemsAgents_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(WecomServer).ItemsAgents(ctx, req.(*EmptyReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _Wecom_Types_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
in := new(EmptyReq)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(WecomServer).Types(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: Wecom_Types_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
return srv.(WecomServer).Types(ctx, req.(*EmptyReq))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// Wecom_ServiceDesc is the grpc.ServiceDesc for Wecom service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var Wecom_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "wecom.Wecom",
|
|
HandlerType: (*WecomServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "ItemsUsers",
|
|
Handler: _Wecom_ItemsUsers_Handler,
|
|
},
|
|
{
|
|
MethodName: "CreateUser",
|
|
Handler: _Wecom_CreateUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateUser",
|
|
Handler: _Wecom_UpdateUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "StatusUser",
|
|
Handler: _Wecom_StatusUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteUser",
|
|
Handler: _Wecom_DeleteUser_Handler,
|
|
},
|
|
{
|
|
MethodName: "ItemsAgents",
|
|
Handler: _Wecom_ItemsAgents_Handler,
|
|
},
|
|
{
|
|
MethodName: "Types",
|
|
Handler: _Wecom_Types_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "wecom/wecom.proto",
|
|
}
|