Documentation ¶
Index ¶
- Variables
- func RegisterSkuServiceServer(s *grpc.Server, srv SkuServiceServer)
- type DeleteRequest
- type Empty
- type GetRequest
- type Inventory
- func (*Inventory) Descriptor() ([]byte, []int)deprecated
- func (x *Inventory) GetQuantity() int64
- func (x *Inventory) GetSkuId() int64
- func (x *Inventory) GetType() Inventory_Type
- func (x *Inventory) GetWarehouseId() int64
- func (*Inventory) ProtoMessage()
- func (x *Inventory) ProtoReflect() protoreflect.Message
- func (x *Inventory) Reset()
- func (x *Inventory) String() string
- type Inventory_Type
- func (Inventory_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Inventory_Type) Enum() *Inventory_Type
- func (Inventory_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Inventory_Type) Number() protoreflect.EnumNumber
- func (x Inventory_Type) String() string
- func (Inventory_Type) Type() protoreflect.EnumType
- type NewRequest
- func (*NewRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NewRequest) GetActive() bool
- func (x *NewRequest) GetAttributes() map[string]string
- func (x *NewRequest) GetCurrency() paymentpb.Currency
- func (x *NewRequest) GetImage() string
- func (x *NewRequest) GetInventory() *Inventory
- func (x *NewRequest) GetMetadata() map[string]string
- func (x *NewRequest) GetName() string
- func (x *NewRequest) GetPackageDimensions() *PackageDimensions
- func (x *NewRequest) GetParent() string
- func (x *NewRequest) GetPrice() uint64
- func (*NewRequest) ProtoMessage()
- func (x *NewRequest) ProtoReflect() protoreflect.Message
- func (x *NewRequest) Reset()
- func (x *NewRequest) String() string
- type PackageDimensions
- func (*PackageDimensions) Descriptor() ([]byte, []int)deprecated
- func (x *PackageDimensions) GetHeight() float64
- func (x *PackageDimensions) GetLength() float64
- func (x *PackageDimensions) GetWeight() float64
- func (x *PackageDimensions) GetWidth() float64
- func (*PackageDimensions) ProtoMessage()
- func (x *PackageDimensions) ProtoReflect() protoreflect.Message
- func (x *PackageDimensions) Reset()
- func (x *PackageDimensions) String() string
- type Sku
- func (*Sku) Descriptor() ([]byte, []int)deprecated
- func (x *Sku) GetActive() bool
- func (x *Sku) GetAttributes() map[string]string
- func (x *Sku) GetCreated() int64
- func (x *Sku) GetCurrency() paymentpb.Currency
- func (x *Sku) GetDescription() string
- func (x *Sku) GetHasBattery() bool
- func (x *Sku) GetHasLiquid() bool
- func (x *Sku) GetHasSensitive() bool
- func (x *Sku) GetId() int64
- func (x *Sku) GetImage() string
- func (x *Sku) GetInventory() []*Inventory
- func (x *Sku) GetMetadata() map[string]string
- func (x *Sku) GetName() string
- func (x *Sku) GetPackageDimensions() *PackageDimensions
- func (x *Sku) GetPrice() uint64
- func (x *Sku) GetProductId() string
- func (x *Sku) GetSkuLabel() string
- func (x *Sku) GetSupplier() string
- func (x *Sku) GetUpdated() int64
- func (*Sku) ProtoMessage()
- func (x *Sku) ProtoReflect() protoreflect.Message
- func (x *Sku) Reset()
- func (x *Sku) String() string
- type SkuServiceClient
- type SkuServiceServer
- type UnimplementedSkuServiceServer
- func (*UnimplementedSkuServiceServer) Delete(context.Context, *DeleteRequest) (*Empty, error)
- func (*UnimplementedSkuServiceServer) Get(context.Context, *GetRequest) (*Sku, error)
- func (*UnimplementedSkuServiceServer) New(context.Context, *NewRequest) (*Sku, error)
- func (*UnimplementedSkuServiceServer) Update(context.Context, *UpdateRequest) (*Sku, error)
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetActive() bool
- func (x *UpdateRequest) GetAttributes() map[string]string
- func (x *UpdateRequest) GetCurrency() paymentpb.Currency
- func (x *UpdateRequest) GetId() string
- func (x *UpdateRequest) GetImage() string
- func (x *UpdateRequest) GetInventory() *Inventory
- func (x *UpdateRequest) GetMetadata() map[string]string
- func (x *UpdateRequest) GetName() string
- func (x *UpdateRequest) GetPackageDimensions() *PackageDimensions
- func (x *UpdateRequest) GetParent() string
- func (x *UpdateRequest) GetPrice() uint64
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Inventory_Type_name = map[int32]string{ 0: "Infinite", 1: "Finite", } Inventory_Type_value = map[string]int32{ "Infinite": 0, "Finite": 1, } )
Enum value maps for Inventory_Type.
var File_sku_skupb_sku_proto protoreflect.FileDescriptor
Functions ¶
func RegisterSkuServiceServer ¶
func RegisterSkuServiceServer(s *grpc.Server, srv SkuServiceServer)
Types ¶
type DeleteRequest ¶
type DeleteRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetId ¶
func (x *DeleteRequest) GetId() string
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
func (*Empty) Descriptor
deprecated
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
type GetRequest ¶
type GetRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetId ¶
func (x *GetRequest) GetId() string
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
type Inventory ¶
type Inventory struct { SkuId int64 `protobuf:"varint,1,opt,name=skuId,proto3" json:"skuId,omitempty"` WarehouseId int64 `protobuf:"varint,2,opt,name=warehouseId,proto3" json:"warehouseId,omitempty"` Quantity int64 `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"` // available quantity Type Inventory_Type `protobuf:"varint,4,opt,name=type,proto3,enum=skupb.Inventory_Type" json:"type,omitempty"` // contains filtered or unexported fields }
func (*Inventory) Descriptor
deprecated
func (*Inventory) GetQuantity ¶
func (*Inventory) GetType ¶
func (x *Inventory) GetType() Inventory_Type
func (*Inventory) GetWarehouseId ¶
func (*Inventory) ProtoMessage ¶
func (*Inventory) ProtoMessage()
func (*Inventory) ProtoReflect ¶
func (x *Inventory) ProtoReflect() protoreflect.Message
type Inventory_Type ¶
type Inventory_Type int32
const ( Inventory_Infinite Inventory_Type = 0 Inventory_Finite Inventory_Type = 1 )
func (Inventory_Type) Descriptor ¶
func (Inventory_Type) Descriptor() protoreflect.EnumDescriptor
func (Inventory_Type) Enum ¶
func (x Inventory_Type) Enum() *Inventory_Type
func (Inventory_Type) EnumDescriptor
deprecated
func (Inventory_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Inventory_Type.Descriptor instead.
func (Inventory_Type) Number ¶
func (x Inventory_Type) Number() protoreflect.EnumNumber
func (Inventory_Type) String ¶
func (x Inventory_Type) String() string
func (Inventory_Type) Type ¶
func (Inventory_Type) Type() protoreflect.EnumType
type NewRequest ¶
type NewRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Currency paymentpb.Currency `protobuf:"varint,2,opt,name=currency,proto3,enum=paymentpb.Currency" json:"currency,omitempty"` Active bool `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"` Price uint64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` Parent string `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ Image string `protobuf:"bytes,7,opt,name=image,proto3" json:"image,omitempty"` PackageDimensions *PackageDimensions `protobuf:"bytes,8,opt,name=packageDimensions,proto3" json:"packageDimensions,omitempty"` Inventory *Inventory `protobuf:"bytes,9,opt,name=inventory,proto3" json:"inventory,omitempty"` Attributes map[string]string `` /* 162-byte string literal not displayed */ // contains filtered or unexported fields }
func (*NewRequest) Descriptor
deprecated
func (*NewRequest) Descriptor() ([]byte, []int)
Deprecated: Use NewRequest.ProtoReflect.Descriptor instead.
func (*NewRequest) GetActive ¶
func (x *NewRequest) GetActive() bool
func (*NewRequest) GetAttributes ¶
func (x *NewRequest) GetAttributes() map[string]string
func (*NewRequest) GetCurrency ¶
func (x *NewRequest) GetCurrency() paymentpb.Currency
func (*NewRequest) GetImage ¶
func (x *NewRequest) GetImage() string
func (*NewRequest) GetInventory ¶
func (x *NewRequest) GetInventory() *Inventory
func (*NewRequest) GetMetadata ¶
func (x *NewRequest) GetMetadata() map[string]string
func (*NewRequest) GetName ¶
func (x *NewRequest) GetName() string
func (*NewRequest) GetPackageDimensions ¶
func (x *NewRequest) GetPackageDimensions() *PackageDimensions
func (*NewRequest) GetParent ¶
func (x *NewRequest) GetParent() string
func (*NewRequest) GetPrice ¶
func (x *NewRequest) GetPrice() uint64
func (*NewRequest) ProtoMessage ¶
func (*NewRequest) ProtoMessage()
func (*NewRequest) ProtoReflect ¶
func (x *NewRequest) ProtoReflect() protoreflect.Message
func (*NewRequest) Reset ¶
func (x *NewRequest) Reset()
func (*NewRequest) String ¶
func (x *NewRequest) String() string
type PackageDimensions ¶
type PackageDimensions struct { Height float64 `protobuf:"fixed64,1,opt,name=height,proto3" json:"height,omitempty"` Length float64 `protobuf:"fixed64,2,opt,name=length,proto3" json:"length,omitempty"` Weight float64 `protobuf:"fixed64,3,opt,name=weight,proto3" json:"weight,omitempty"` Width float64 `protobuf:"fixed64,4,opt,name=width,proto3" json:"width,omitempty"` // contains filtered or unexported fields }
func (*PackageDimensions) Descriptor
deprecated
func (*PackageDimensions) Descriptor() ([]byte, []int)
Deprecated: Use PackageDimensions.ProtoReflect.Descriptor instead.
func (*PackageDimensions) GetHeight ¶
func (x *PackageDimensions) GetHeight() float64
func (*PackageDimensions) GetLength ¶
func (x *PackageDimensions) GetLength() float64
func (*PackageDimensions) GetWeight ¶
func (x *PackageDimensions) GetWeight() float64
func (*PackageDimensions) GetWidth ¶
func (x *PackageDimensions) GetWidth() float64
func (*PackageDimensions) ProtoMessage ¶
func (*PackageDimensions) ProtoMessage()
func (*PackageDimensions) ProtoReflect ¶
func (x *PackageDimensions) ProtoReflect() protoreflect.Message
func (*PackageDimensions) Reset ¶
func (x *PackageDimensions) Reset()
func (*PackageDimensions) String ¶
func (x *PackageDimensions) String() string
type Sku ¶
type Sku struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Price uint64 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"` // dollar Currency paymentpb.Currency `protobuf:"varint,4,opt,name=currency,proto3,enum=paymentpb.Currency" json:"currency,omitempty"` Active bool `protobuf:"varint,5,opt,name=active,proto3" json:"active,omitempty"` ProductId string `protobuf:"bytes,6,opt,name=productId,proto3" json:"productId,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ Attributes map[string]string `` /* 161-byte string literal not displayed */ Image string `protobuf:"bytes,9,opt,name=image,proto3" json:"image,omitempty"` PackageDimensions *PackageDimensions `protobuf:"bytes,10,opt,name=packageDimensions,proto3" json:"packageDimensions,omitempty"` Inventory []*Inventory `protobuf:"bytes,11,rep,name=inventory,proto3" json:"inventory,omitempty"` HasBattery bool `protobuf:"varint,12,opt,name=hasBattery,proto3" json:"hasBattery,omitempty"` HasLiquid bool `protobuf:"varint,13,opt,name=hasLiquid,proto3" json:"hasLiquid,omitempty"` HasSensitive bool `protobuf:"varint,14,opt,name=hasSensitive,proto3" json:"hasSensitive,omitempty"` Description string `protobuf:"bytes,15,opt,name=description,proto3" json:"description,omitempty"` SkuLabel string `protobuf:"bytes,16,opt,name=skuLabel,proto3" json:"skuLabel,omitempty"` Supplier string `protobuf:"bytes,17,opt,name=supplier,proto3" json:"supplier,omitempty"` Created int64 `protobuf:"varint,998,opt,name=created,proto3" json:"created,omitempty"` Updated int64 `protobuf:"varint,999,opt,name=updated,proto3" json:"updated,omitempty"` // contains filtered or unexported fields }
func (*Sku) Descriptor
deprecated
func (*Sku) GetAttributes ¶
func (*Sku) GetCreated ¶
func (*Sku) GetCurrency ¶
func (*Sku) GetDescription ¶
func (*Sku) GetHasBattery ¶
func (*Sku) GetHasLiquid ¶
func (*Sku) GetHasSensitive ¶
func (*Sku) GetInventory ¶
func (*Sku) GetMetadata ¶
func (*Sku) GetPackageDimensions ¶
func (x *Sku) GetPackageDimensions() *PackageDimensions
func (*Sku) GetProductId ¶
func (*Sku) GetSkuLabel ¶
func (*Sku) GetSupplier ¶
func (*Sku) GetUpdated ¶
func (*Sku) ProtoMessage ¶
func (*Sku) ProtoMessage()
func (*Sku) ProtoReflect ¶
func (x *Sku) ProtoReflect() protoreflect.Message
type SkuServiceClient ¶
type SkuServiceClient interface { New(ctx context.Context, in *NewRequest, opts ...grpc.CallOption) (*Sku, error) Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Sku, error) Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*Sku, error) Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error) }
SkuServiceClient is the client API for SkuService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSkuServiceClient ¶
func NewSkuServiceClient(cc grpc.ClientConnInterface) SkuServiceClient
type SkuServiceServer ¶
type SkuServiceServer interface { New(context.Context, *NewRequest) (*Sku, error) Get(context.Context, *GetRequest) (*Sku, error) Update(context.Context, *UpdateRequest) (*Sku, error) Delete(context.Context, *DeleteRequest) (*Empty, error) }
SkuServiceServer is the server API for SkuService service.
type UnimplementedSkuServiceServer ¶
type UnimplementedSkuServiceServer struct { }
UnimplementedSkuServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedSkuServiceServer) Delete ¶
func (*UnimplementedSkuServiceServer) Delete(context.Context, *DeleteRequest) (*Empty, error)
func (*UnimplementedSkuServiceServer) Get ¶
func (*UnimplementedSkuServiceServer) Get(context.Context, *GetRequest) (*Sku, error)
func (*UnimplementedSkuServiceServer) New ¶
func (*UnimplementedSkuServiceServer) New(context.Context, *NewRequest) (*Sku, error)
func (*UnimplementedSkuServiceServer) Update ¶
func (*UnimplementedSkuServiceServer) Update(context.Context, *UpdateRequest) (*Sku, error)
type UpdateRequest ¶
type UpdateRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Currency paymentpb.Currency `protobuf:"varint,3,opt,name=currency,proto3,enum=paymentpb.Currency" json:"currency,omitempty"` Active bool `protobuf:"varint,4,opt,name=active,proto3" json:"active,omitempty"` Price uint64 `protobuf:"varint,5,opt,name=price,proto3" json:"price,omitempty"` Parent string `protobuf:"bytes,6,opt,name=parent,proto3" json:"parent,omitempty"` Metadata map[string]string `` /* 157-byte string literal not displayed */ Image string `protobuf:"bytes,8,opt,name=image,proto3" json:"image,omitempty"` PackageDimensions *PackageDimensions `protobuf:"bytes,9,opt,name=packageDimensions,proto3" json:"packageDimensions,omitempty"` Inventory *Inventory `protobuf:"bytes,10,opt,name=inventory,proto3" json:"inventory,omitempty"` Attributes map[string]string `` /* 162-byte string literal not displayed */ // contains filtered or unexported fields }
func (*UpdateRequest) Descriptor
deprecated
func (*UpdateRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateRequest.ProtoReflect.Descriptor instead.
func (*UpdateRequest) GetActive ¶
func (x *UpdateRequest) GetActive() bool
func (*UpdateRequest) GetAttributes ¶
func (x *UpdateRequest) GetAttributes() map[string]string
func (*UpdateRequest) GetCurrency ¶
func (x *UpdateRequest) GetCurrency() paymentpb.Currency
func (*UpdateRequest) GetId ¶
func (x *UpdateRequest) GetId() string
func (*UpdateRequest) GetImage ¶
func (x *UpdateRequest) GetImage() string
func (*UpdateRequest) GetInventory ¶
func (x *UpdateRequest) GetInventory() *Inventory
func (*UpdateRequest) GetMetadata ¶
func (x *UpdateRequest) GetMetadata() map[string]string
func (*UpdateRequest) GetName ¶
func (x *UpdateRequest) GetName() string
func (*UpdateRequest) GetPackageDimensions ¶
func (x *UpdateRequest) GetPackageDimensions() *PackageDimensions
func (*UpdateRequest) GetParent ¶
func (x *UpdateRequest) GetParent() string
func (*UpdateRequest) GetPrice ¶
func (x *UpdateRequest) GetPrice() uint64
func (*UpdateRequest) ProtoMessage ¶
func (*UpdateRequest) ProtoMessage()
func (*UpdateRequest) ProtoReflect ¶
func (x *UpdateRequest) ProtoReflect() protoreflect.Message
func (*UpdateRequest) Reset ¶
func (x *UpdateRequest) Reset()
func (*UpdateRequest) String ¶
func (x *UpdateRequest) String() string