supplier

package
v0.0.48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
var File_supplier_supplier_proto protoreflect.FileDescriptor
View Source
var SupplierService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "supplier.SupplierService",
	HandlerType: (*SupplierServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Create",
			Handler:    _SupplierService_Create_Handler,
		},
		{
			MethodName: "List",
			Handler:    _SupplierService_List_Handler,
		},
		{
			MethodName: "Supplier",
			Handler:    _SupplierService_Supplier_Handler,
		},
		{
			MethodName: "Update",
			Handler:    _SupplierService_Update_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 ListRequest added in v0.0.33

type ListRequest struct {
	// contains filtered or unexported fields
}

func (*ListRequest) Descriptor deprecated added in v0.0.33

func (*ListRequest) Descriptor() ([]byte, []int)

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) ProtoMessage added in v0.0.33

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect added in v0.0.33

func (x *ListRequest) ProtoReflect() protoreflect.Message

func (*ListRequest) Reset added in v0.0.33

func (x *ListRequest) Reset()

func (*ListRequest) String added in v0.0.33

func (x *ListRequest) String() string

type ListResponse added in v0.0.33

type ListResponse struct {
	Suppliers []*Supplier `protobuf:"bytes,1,rep,name=suppliers,proto3" json:"suppliers,omitempty"`
	// contains filtered or unexported fields
}

func (*ListResponse) Descriptor deprecated added in v0.0.33

func (*ListResponse) Descriptor() ([]byte, []int)

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetSuppliers added in v0.0.33

func (x *ListResponse) GetSuppliers() []*Supplier

func (*ListResponse) ProtoMessage added in v0.0.33

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect added in v0.0.33

func (x *ListResponse) ProtoReflect() protoreflect.Message

func (*ListResponse) Reset added in v0.0.33

func (x *ListResponse) Reset()

func (*ListResponse) String added in v0.0.33

func (x *ListResponse) String() string

type ProductSupplier

type ProductSupplier struct {
	Price     *core.Money `protobuf:"bytes,2,opt,name=price,proto3" json:"price,omitempty"`
	ProductId int32       `protobuf:"varint,3,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ProductSupplier) Descriptor deprecated

func (*ProductSupplier) Descriptor() ([]byte, []int)

Deprecated: Use ProductSupplier.ProtoReflect.Descriptor instead.

func (*ProductSupplier) GetPrice

func (x *ProductSupplier) GetPrice() *core.Money

func (*ProductSupplier) GetProductId added in v0.0.38

func (x *ProductSupplier) GetProductId() int32

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"`
	Products []*ProductSupplier `protobuf:"bytes,4,rep,name=products,proto3" json:"products,omitempty"`
	// contains filtered or unexported fields
}

func (*Supplier) Descriptor deprecated

func (*Supplier) Descriptor() ([]byte, []int)

Deprecated: Use Supplier.ProtoReflect.Descriptor instead.

func (*Supplier) GetId

func (x *Supplier) GetId() int32

func (*Supplier) GetName

func (x *Supplier) GetName() string

func (*Supplier) GetProducts added in v0.0.34

func (x *Supplier) GetProducts() []*ProductSupplier

func (*Supplier) GetType

func (x *Supplier) GetType() SupplierType

func (*Supplier) ProtoMessage

func (*Supplier) ProtoMessage()

func (*Supplier) ProtoReflect

func (x *Supplier) ProtoReflect() protoreflect.Message

func (*Supplier) Reset

func (x *Supplier) Reset()

func (*Supplier) String

func (x *Supplier) String() string

type SupplierRequest added in v0.0.35

type SupplierRequest struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*SupplierRequest) Descriptor deprecated added in v0.0.35

func (*SupplierRequest) Descriptor() ([]byte, []int)

Deprecated: Use SupplierRequest.ProtoReflect.Descriptor instead.

func (*SupplierRequest) GetId added in v0.0.35

func (x *SupplierRequest) GetId() int32

func (*SupplierRequest) ProtoMessage added in v0.0.35

func (*SupplierRequest) ProtoMessage()

func (*SupplierRequest) ProtoReflect added in v0.0.35

func (x *SupplierRequest) ProtoReflect() protoreflect.Message

func (*SupplierRequest) Reset added in v0.0.35

func (x *SupplierRequest) Reset()

func (*SupplierRequest) String added in v0.0.35

func (x *SupplierRequest) String() string

type SupplierResponse added in v0.0.35

type SupplierResponse struct {
	Supplier *Supplier `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier,omitempty"`
	// contains filtered or unexported fields
}

func (*SupplierResponse) Descriptor deprecated added in v0.0.35

func (*SupplierResponse) Descriptor() ([]byte, []int)

Deprecated: Use SupplierResponse.ProtoReflect.Descriptor instead.

func (*SupplierResponse) GetSupplier added in v0.0.35

func (x *SupplierResponse) GetSupplier() *Supplier

func (*SupplierResponse) ProtoMessage added in v0.0.35

func (*SupplierResponse) ProtoMessage()

func (*SupplierResponse) ProtoReflect added in v0.0.35

func (x *SupplierResponse) ProtoReflect() protoreflect.Message

func (*SupplierResponse) Reset added in v0.0.35

func (x *SupplierResponse) Reset()

func (*SupplierResponse) String added in v0.0.35

func (x *SupplierResponse) String() string

type SupplierServiceClient

type SupplierServiceClient interface {
	Create(ctx context.Context, in *CreateRequest, opts ...grpc.CallOption) (*CreateResponse, error)
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	Supplier(ctx context.Context, in *SupplierRequest, opts ...grpc.CallOption) (*SupplierResponse, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*UpdateResponse, 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.

type SupplierServiceServer

type SupplierServiceServer interface {
	Create(context.Context, *CreateRequest) (*CreateResponse, error)
	List(context.Context, *ListRequest) (*ListResponse, error)
	Supplier(context.Context, *SupplierRequest) (*SupplierResponse, error)
	Update(context.Context, *UpdateRequest) (*UpdateResponse, 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) Enum

func (x SupplierType) Enum() *SupplierType

func (SupplierType) EnumDescriptor deprecated

func (SupplierType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SupplierType.Descriptor instead.

func (SupplierType) Number

func (SupplierType) String

func (x SupplierType) String() string

func (SupplierType) Type

type UnimplementedSupplierServiceServer

type UnimplementedSupplierServiceServer struct {
}

UnimplementedSupplierServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedSupplierServiceServer) Create

func (UnimplementedSupplierServiceServer) List added in v0.0.33

func (UnimplementedSupplierServiceServer) Supplier added in v0.0.35

func (UnimplementedSupplierServiceServer) Update added in v0.0.35

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.

type UpdateRequest added in v0.0.35

type UpdateRequest struct {
	Supplier *Supplier `protobuf:"bytes,1,opt,name=supplier,proto3" json:"supplier,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateRequest) Descriptor deprecated added in v0.0.35

func (*UpdateRequest) Descriptor() ([]byte, []int)

Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.

func (*UpdateRequest) GetSupplier added in v0.0.37

func (x *UpdateRequest) GetSupplier() *Supplier

func (*UpdateRequest) ProtoMessage added in v0.0.35

func (*UpdateRequest) ProtoMessage()

func (*UpdateRequest) ProtoReflect added in v0.0.35

func (x *UpdateRequest) ProtoReflect() protoreflect.Message

func (*UpdateRequest) Reset added in v0.0.35

func (x *UpdateRequest) Reset()

func (*UpdateRequest) String added in v0.0.35

func (x *UpdateRequest) String() string

type UpdateResponse added in v0.0.35

type UpdateResponse struct {
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateResponse) Descriptor deprecated added in v0.0.35

func (*UpdateResponse) Descriptor() ([]byte, []int)

Deprecated: Use UpdateResponse.ProtoReflect.Descriptor instead.

func (*UpdateResponse) GetId added in v0.0.35

func (x *UpdateResponse) GetId() int32

func (*UpdateResponse) ProtoMessage added in v0.0.35

func (*UpdateResponse) ProtoMessage()

func (*UpdateResponse) ProtoReflect added in v0.0.35

func (x *UpdateResponse) ProtoReflect() protoreflect.Message

func (*UpdateResponse) Reset added in v0.0.35

func (x *UpdateResponse) Reset()

func (*UpdateResponse) String added in v0.0.35

func (x *UpdateResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL