2026-08-09 10:43:45 +08:00
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
2026-08-09 15:10:19 +08:00
// - protoc-gen-go-grpc v1.6.2
2026-08-09 18:40:36 +08:00
// - protoc v7.35.1
2026-08-09 15:10:19 +08:00
// source: module/ec/market/proto/supply.proto
2026-08-09 10:43:45 +08:00
package market
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 (
Supply_Create_FullMethodName = "/market.Supply/Create"
Supply_Get_FullMethodName = "/market.Supply/Get"
Supply_Fetch_FullMethodName = "/market.Supply/Fetch"
Supply_Modify_FullMethodName = "/market.Supply/Modify"
Supply_Delete_FullMethodName = "/market.Supply/Delete"
)
// SupplyClient is the client API for Supply 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 SupplyClient interface {
// 新增供应商
2026-08-09 20:14:57 +08:00
Create ( ctx context . Context , in * MarketSupplyItem , opts ... grpc . CallOption ) ( * IdentityStatusReply , error )
2026-08-09 10:43:45 +08:00
// 获取一个供应商
2026-08-09 20:14:57 +08:00
Get ( ctx context . Context , in * IdentRequest , opts ... grpc . CallOption ) ( * MarketSupplyItem , error )
2026-08-09 10:43:45 +08:00
// 供应商列表
2026-08-09 20:14:57 +08:00
Fetch ( ctx context . Context , in * MarketFetchRequest , opts ... grpc . CallOption ) ( * SupplyReply , error )
2026-08-09 10:43:45 +08:00
// 更新供应商数据
2026-08-09 20:14:57 +08:00
Modify ( ctx context . Context , in * MarketSupplyItem , opts ... grpc . CallOption ) ( * IdentityStatusReply , error )
2026-08-09 10:43:45 +08:00
// 删除一个供应商
2026-08-09 20:14:57 +08:00
Delete ( ctx context . Context , in * IdentRequest , opts ... grpc . CallOption ) ( * IdentityStatusReply , error )
2026-08-09 10:43:45 +08:00
}
type supplyClient struct {
cc grpc . ClientConnInterface
}
func NewSupplyClient ( cc grpc . ClientConnInterface ) SupplyClient {
return & supplyClient { cc }
}
2026-08-09 20:14:57 +08:00
func ( c * supplyClient ) Create ( ctx context . Context , in * MarketSupplyItem , opts ... grpc . CallOption ) ( * IdentityStatusReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-08-09 20:14:57 +08:00
out := new ( IdentityStatusReply )
2026-08-09 10:43:45 +08:00
err := c . cc . Invoke ( ctx , Supply_Create_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 20:14:57 +08:00
func ( c * supplyClient ) Get ( ctx context . Context , in * IdentRequest , opts ... grpc . CallOption ) ( * MarketSupplyItem , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( MarketSupplyItem )
err := c . cc . Invoke ( ctx , Supply_Get_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 20:14:57 +08:00
func ( c * supplyClient ) Fetch ( ctx context . Context , in * MarketFetchRequest , opts ... grpc . CallOption ) ( * SupplyReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
out := new ( SupplyReply )
err := c . cc . Invoke ( ctx , Supply_Fetch_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 20:14:57 +08:00
func ( c * supplyClient ) Modify ( ctx context . Context , in * MarketSupplyItem , opts ... grpc . CallOption ) ( * IdentityStatusReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-08-09 20:14:57 +08:00
out := new ( IdentityStatusReply )
2026-08-09 10:43:45 +08:00
err := c . cc . Invoke ( ctx , Supply_Modify_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
2026-08-09 20:14:57 +08:00
func ( c * supplyClient ) Delete ( ctx context . Context , in * IdentRequest , opts ... grpc . CallOption ) ( * IdentityStatusReply , error ) {
2026-08-09 10:43:45 +08:00
cOpts := append ( [ ] grpc . CallOption { grpc . StaticMethod ( ) } , opts ... )
2026-08-09 20:14:57 +08:00
out := new ( IdentityStatusReply )
2026-08-09 10:43:45 +08:00
err := c . cc . Invoke ( ctx , Supply_Delete_FullMethodName , in , out , cOpts ... )
if err != nil {
return nil , err
}
return out , nil
}
// SupplyServer is the server API for Supply service.
2026-08-09 15:10:19 +08:00
// All implementations should embed UnimplementedSupplyServer
2026-08-09 10:43:45 +08:00
// for forward compatibility.
//
// 营销服务 - 供应商
type SupplyServer interface {
// 新增供应商
2026-08-09 20:14:57 +08:00
Create ( context . Context , * MarketSupplyItem ) ( * IdentityStatusReply , error )
2026-08-09 10:43:45 +08:00
// 获取一个供应商
2026-08-09 20:14:57 +08:00
Get ( context . Context , * IdentRequest ) ( * MarketSupplyItem , error )
2026-08-09 10:43:45 +08:00
// 供应商列表
2026-08-09 20:14:57 +08:00
Fetch ( context . Context , * MarketFetchRequest ) ( * SupplyReply , error )
2026-08-09 10:43:45 +08:00
// 更新供应商数据
2026-08-09 20:14:57 +08:00
Modify ( context . Context , * MarketSupplyItem ) ( * IdentityStatusReply , error )
2026-08-09 10:43:45 +08:00
// 删除一个供应商
2026-08-09 20:14:57 +08:00
Delete ( context . Context , * IdentRequest ) ( * IdentityStatusReply , error )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
// UnimplementedSupplyServer should be embedded to have
2026-08-09 10:43:45 +08:00
// forward compatible implementations.
//
// NOTE: this should be embedded by value instead of pointer to avoid a nil
// pointer dereference when methods are called.
type UnimplementedSupplyServer struct { }
2026-08-09 20:14:57 +08:00
func ( UnimplementedSupplyServer ) Create ( context . Context , * MarketSupplyItem ) ( * IdentityStatusReply , error ) {
2026-08-09 15:10:19 +08:00
return nil , status . Error ( codes . Unimplemented , "method Create not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 20:14:57 +08:00
func ( UnimplementedSupplyServer ) Get ( context . Context , * IdentRequest ) ( * MarketSupplyItem , error ) {
2026-08-09 15:10:19 +08:00
return nil , status . Error ( codes . Unimplemented , "method Get not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 20:14:57 +08:00
func ( UnimplementedSupplyServer ) Fetch ( context . Context , * MarketFetchRequest ) ( * SupplyReply , error ) {
2026-08-09 15:10:19 +08:00
return nil , status . Error ( codes . Unimplemented , "method Fetch not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 20:14:57 +08:00
func ( UnimplementedSupplyServer ) Modify ( context . Context , * MarketSupplyItem ) ( * IdentityStatusReply , error ) {
2026-08-09 15:10:19 +08:00
return nil , status . Error ( codes . Unimplemented , "method Modify not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 20:14:57 +08:00
func ( UnimplementedSupplyServer ) Delete ( context . Context , * IdentRequest ) ( * IdentityStatusReply , error ) {
2026-08-09 15:10:19 +08:00
return nil , status . Error ( codes . Unimplemented , "method Delete not implemented" )
2026-08-09 10:43:45 +08:00
}
2026-08-09 15:10:19 +08:00
func ( UnimplementedSupplyServer ) testEmbeddedByValue ( ) { }
2026-08-09 10:43:45 +08:00
// UnsafeSupplyServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SupplyServer will
// result in compilation errors.
type UnsafeSupplyServer interface {
mustEmbedUnimplementedSupplyServer ( )
}
func RegisterSupplyServer ( s grpc . ServiceRegistrar , srv SupplyServer ) {
2026-08-09 15:10:19 +08:00
// If the following call panics, it indicates UnimplementedSupplyServer was
2026-08-09 10:43:45 +08:00
// 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 ( & Supply_ServiceDesc , srv )
}
func _Supply_Create_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( MarketSupplyItem )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SupplyServer ) . Create ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Supply_Create_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SupplyServer ) . Create ( ctx , req . ( * MarketSupplyItem ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Supply_Get_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2026-08-09 20:14:57 +08:00
in := new ( IdentRequest )
2026-08-09 10:43:45 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SupplyServer ) . Get ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Supply_Get_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-08-09 20:14:57 +08:00
return srv . ( SupplyServer ) . Get ( ctx , req . ( * IdentRequest ) )
2026-08-09 10:43:45 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _Supply_Fetch_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2026-08-09 20:14:57 +08:00
in := new ( MarketFetchRequest )
2026-08-09 10:43:45 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SupplyServer ) . Fetch ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Supply_Fetch_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-08-09 20:14:57 +08:00
return srv . ( SupplyServer ) . Fetch ( ctx , req . ( * MarketFetchRequest ) )
2026-08-09 10:43:45 +08:00
}
return interceptor ( ctx , in , info , handler )
}
func _Supply_Modify_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
in := new ( MarketSupplyItem )
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SupplyServer ) . Modify ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Supply_Modify_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
return srv . ( SupplyServer ) . Modify ( ctx , req . ( * MarketSupplyItem ) )
}
return interceptor ( ctx , in , info , handler )
}
func _Supply_Delete_Handler ( srv interface { } , ctx context . Context , dec func ( interface { } ) error , interceptor grpc . UnaryServerInterceptor ) ( interface { } , error ) {
2026-08-09 20:14:57 +08:00
in := new ( IdentRequest )
2026-08-09 10:43:45 +08:00
if err := dec ( in ) ; err != nil {
return nil , err
}
if interceptor == nil {
return srv . ( SupplyServer ) . Delete ( ctx , in )
}
info := & grpc . UnaryServerInfo {
Server : srv ,
FullMethod : Supply_Delete_FullMethodName ,
}
handler := func ( ctx context . Context , req interface { } ) ( interface { } , error ) {
2026-08-09 20:14:57 +08:00
return srv . ( SupplyServer ) . Delete ( ctx , req . ( * IdentRequest ) )
2026-08-09 10:43:45 +08:00
}
return interceptor ( ctx , in , info , handler )
}
// Supply_ServiceDesc is the grpc.ServiceDesc for Supply service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Supply_ServiceDesc = grpc . ServiceDesc {
ServiceName : "market.Supply" ,
HandlerType : ( * SupplyServer ) ( nil ) ,
Methods : [ ] grpc . MethodDesc {
{
MethodName : "Create" ,
Handler : _Supply_Create_Handler ,
} ,
{
MethodName : "Get" ,
Handler : _Supply_Get_Handler ,
} ,
{
MethodName : "Fetch" ,
Handler : _Supply_Fetch_Handler ,
} ,
{
MethodName : "Modify" ,
Handler : _Supply_Modify_Handler ,
} ,
{
MethodName : "Delete" ,
Handler : _Supply_Delete_Handler ,
} ,
} ,
Streams : [ ] grpc . StreamDesc { } ,
2026-08-09 15:10:19 +08:00
Metadata : "module/ec/market/proto/supply.proto" ,
2026-08-09 10:43:45 +08:00
}