Documentation
¶
Index ¶
- Variables
- func RegisterSupplierServiceServer(s grpc.ServiceRegistrar, srv SupplierServiceServer)
- type CreateRequest
- type CreateResponse
- type ProductSupplier
- func (*ProductSupplier) Descriptor() ([]byte, []int)deprecated
- func (x *ProductSupplier) GetId() int32
- func (x *ProductSupplier) GetPrice() *core.Money
- func (x *ProductSupplier) GetProduct() *product.Product
- func (*ProductSupplier) ProtoMessage()
- func (x *ProductSupplier) ProtoReflect() protoreflect.Message
- func (x *ProductSupplier) Reset()
- func (x *ProductSupplier) String() string
- type Supplier
- func (*Supplier) Descriptor() ([]byte, []int)deprecated
- func (x *Supplier) GetId() int32
- func (x *Supplier) GetName() string
- func (x *Supplier) GetType() SupplierType
- func (*Supplier) ProtoMessage()
- func (x *Supplier) ProtoReflect() protoreflect.Message
- func (x *Supplier) Reset()
- func (x *Supplier) String() string
- type SupplierServiceClient
- type SupplierServiceServer
- type SupplierType
- func (SupplierType) Descriptor() protoreflect.EnumDescriptor
- func (x SupplierType) Enum() *SupplierType
- func (SupplierType) EnumDescriptor() ([]byte, []int)deprecated
- func (x SupplierType) Number() protoreflect.EnumNumber
- func (x SupplierType) String() string
- func (SupplierType) Type() protoreflect.EnumType
- type UnimplementedSupplierServiceServer
- type UnsafeSupplierServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( SupplierType_name = map[int32]string{ 0: "SUPPLIER_TYPE_AVAILABLE", 1: "SUPPLIER_TYPE_NOT_AVAILABLE", } SupplierType_value = map[string]int32{ "SUPPLIER_TYPE_AVAILABLE": 0, "SUPPLIER_TYPE_NOT_AVAILABLE": 1, } )
Enum value maps for SupplierType.
var File_supplier_supplier_proto protoreflect.FileDescriptor
var SupplierService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "supplier.SupplierService", HandlerType: (*SupplierServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Create", Handler: _SupplierService_Create_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "supplier/supplier.proto", }
SupplierService_ServiceDesc is the grpc.ServiceDesc for SupplierService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSupplierServiceServer ¶
func RegisterSupplierServiceServer(s grpc.ServiceRegistrar, srv SupplierServiceServer)
Types ¶
type CreateRequest ¶
type CreateRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*CreateRequest) Descriptor
deprecated
func (*CreateRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateRequest.ProtoReflect.Descriptor instead.
func (*CreateRequest) GetName ¶
func (x *CreateRequest) GetName() string
func (*CreateRequest) ProtoMessage ¶
func (*CreateRequest) ProtoMessage()
func (*CreateRequest) ProtoReflect ¶
func (x *CreateRequest) ProtoReflect() protoreflect.Message
func (*CreateRequest) Reset ¶
func (x *CreateRequest) Reset()
func (*CreateRequest) String ¶
func (x *CreateRequest) String() string
type CreateResponse ¶
type CreateResponse struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CreateResponse) Descriptor
deprecated
func (*CreateResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateResponse.ProtoReflect.Descriptor instead.
func (*CreateResponse) GetId ¶
func (x *CreateResponse) GetId() int32
func (*CreateResponse) ProtoMessage ¶
func (*CreateResponse) ProtoMessage()
func (*CreateResponse) ProtoReflect ¶
func (x *CreateResponse) ProtoReflect() protoreflect.Message
func (*CreateResponse) Reset ¶
func (x *CreateResponse) Reset()
func (*CreateResponse) String ¶
func (x *CreateResponse) String() string
type ProductSupplier ¶
type ProductSupplier struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Price *core.Money `protobuf:"bytes,2,opt,name=price,proto3" json:"price,omitempty"` Product *product.Product `protobuf:"bytes,3,opt,name=product,proto3" json:"product,omitempty"` // contains filtered or unexported fields }
func (*ProductSupplier) Descriptor
deprecated
func (*ProductSupplier) Descriptor() ([]byte, []int)
Deprecated: Use ProductSupplier.ProtoReflect.Descriptor instead.
func (*ProductSupplier) GetId ¶
func (x *ProductSupplier) GetId() int32
func (*ProductSupplier) GetPrice ¶
func (x *ProductSupplier) GetPrice() *core.Money
func (*ProductSupplier) GetProduct ¶
func (x *ProductSupplier) GetProduct() *product.Product
func (*ProductSupplier) ProtoMessage ¶
func (*ProductSupplier) ProtoMessage()
func (*ProductSupplier) ProtoReflect ¶
func (x *ProductSupplier) ProtoReflect() protoreflect.Message
func (*ProductSupplier) Reset ¶
func (x *ProductSupplier) Reset()
func (*ProductSupplier) String ¶
func (x *ProductSupplier) String() string
type Supplier ¶
type Supplier struct { Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Type SupplierType `protobuf:"varint,3,opt,name=type,proto3,enum=supplier.SupplierType" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Supplier) Descriptor
deprecated
func (*Supplier) GetType ¶
func (x *Supplier) GetType() SupplierType
func (*Supplier) ProtoMessage ¶
func (*Supplier) ProtoMessage()
func (*Supplier) ProtoReflect ¶
func (x *Supplier) ProtoReflect() protoreflect.Message
type SupplierServiceClient ¶
type SupplierServiceClient interface {
Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
}
SupplierServiceClient is the client API for SupplierService 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 NewSupplierServiceClient ¶
func NewSupplierServiceClient(cc grpc.ClientConnInterface) SupplierServiceClient
type SupplierServiceServer ¶
type SupplierServiceServer interface { Create(context.Context, *CreateRequest) (*CreateResponse, error) // contains filtered or unexported methods }
SupplierServiceServer is the server API for SupplierService service. All implementations must embed UnimplementedSupplierServiceServer for forward compatibility
type SupplierType ¶
type SupplierType int32
const ( SupplierType_SUPPLIER_TYPE_AVAILABLE SupplierType = 0 SupplierType_SUPPLIER_TYPE_NOT_AVAILABLE SupplierType = 1 )
func (SupplierType) Descriptor ¶
func (SupplierType) Descriptor() protoreflect.EnumDescriptor
func (SupplierType) Enum ¶
func (x SupplierType) Enum() *SupplierType
func (SupplierType) EnumDescriptor
deprecated
func (SupplierType) EnumDescriptor() ([]byte, []int)
Deprecated: Use SupplierType.Descriptor instead.
func (SupplierType) Number ¶
func (x SupplierType) Number() protoreflect.EnumNumber
func (SupplierType) String ¶
func (x SupplierType) String() string
func (SupplierType) Type ¶
func (SupplierType) Type() protoreflect.EnumType
type UnimplementedSupplierServiceServer ¶
type UnimplementedSupplierServiceServer struct { }
UnimplementedSupplierServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedSupplierServiceServer) Create ¶
func (UnimplementedSupplierServiceServer) Create(context.Context, *CreateRequest) (*CreateResponse, error)
type UnsafeSupplierServiceServer ¶
type UnsafeSupplierServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSupplierServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SupplierServiceServer will result in compilation errors.