skupb

package
v0.0.0-...-8b9d747 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Inventory.ProtoReflect.Descriptor instead.

func (*Inventory) GetQuantity

func (x *Inventory) GetQuantity() int64

func (*Inventory) GetSkuId

func (x *Inventory) GetSkuId() int64

func (*Inventory) GetType

func (x *Inventory) GetType() Inventory_Type

func (*Inventory) GetWarehouseId

func (x *Inventory) GetWarehouseId() int64

func (*Inventory) ProtoMessage

func (*Inventory) ProtoMessage()

func (*Inventory) ProtoReflect

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

func (*Inventory) Reset

func (x *Inventory) Reset()

func (*Inventory) String

func (x *Inventory) String() string

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) 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 (Inventory_Type) String

func (x Inventory_Type) String() string

func (Inventory_Type) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Sku.ProtoReflect.Descriptor instead.

func (*Sku) GetActive

func (x *Sku) GetActive() bool

func (*Sku) GetAttributes

func (x *Sku) GetAttributes() map[string]string

func (*Sku) GetCreated

func (x *Sku) GetCreated() int64

func (*Sku) GetCurrency

func (x *Sku) GetCurrency() paymentpb.Currency

func (*Sku) GetDescription

func (x *Sku) GetDescription() string

func (*Sku) GetHasBattery

func (x *Sku) GetHasBattery() bool

func (*Sku) GetHasLiquid

func (x *Sku) GetHasLiquid() bool

func (*Sku) GetHasSensitive

func (x *Sku) GetHasSensitive() bool

func (*Sku) GetId

func (x *Sku) GetId() int64

func (*Sku) GetImage

func (x *Sku) GetImage() string

func (*Sku) GetInventory

func (x *Sku) GetInventory() []*Inventory

func (*Sku) GetMetadata

func (x *Sku) GetMetadata() map[string]string

func (*Sku) GetName

func (x *Sku) GetName() string

func (*Sku) GetPackageDimensions

func (x *Sku) GetPackageDimensions() *PackageDimensions

func (*Sku) GetPrice

func (x *Sku) GetPrice() uint64

func (*Sku) GetProductId

func (x *Sku) GetProductId() string

func (*Sku) GetSkuLabel

func (x *Sku) GetSkuLabel() string

func (*Sku) GetSupplier

func (x *Sku) GetSupplier() string

func (*Sku) GetUpdated

func (x *Sku) GetUpdated() int64

func (*Sku) ProtoMessage

func (*Sku) ProtoMessage()

func (*Sku) ProtoReflect

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

func (*Sku) Reset

func (x *Sku) Reset()

func (*Sku) String

func (x *Sku) String() string

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) Get

func (*UnimplementedSkuServiceServer) New

func (*UnimplementedSkuServiceServer) Update

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

Jump to

Keyboard shortcuts

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