productpb

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 (
	Category_name = map[int32]string{
		0: "Electronics",
		1: "Food",
		2: "Sports",
	}
	Category_value = map[string]int32{
		"Electronics": 0,
		"Food":        1,
		"Sports":      2,
	}
)

Enum value maps for Category.

View Source
var File_product_productpb_product_proto protoreflect.FileDescriptor

Functions

func RegisterProductServiceServer

func RegisterProductServiceServer(s *grpc.Server, srv ProductServiceServer)

Types

type Category

type Category int32
const (
	Category_Electronics Category = 0
	Category_Food        Category = 1
	Category_Sports      Category = 2
)

func (Category) Descriptor

func (Category) Descriptor() protoreflect.EnumDescriptor

func (Category) Enum

func (x Category) Enum() *Category

func (Category) EnumDescriptor deprecated

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

Deprecated: Use Category.Descriptor instead.

func (Category) Number

func (x Category) Number() protoreflect.EnumNumber

func (Category) String

func (x Category) String() string

func (Category) Type

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 NewRequest

type NewRequest struct {
	Name        string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Active      bool              `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"`
	Attributes  []string          `protobuf:"bytes,3,rep,name=attributes,proto3" json:"attributes,omitempty"`
	Description string            `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
	Images      []string          `protobuf:"bytes,5,rep,name=images,proto3" json:"images,omitempty"`
	Metadata    map[string]string `` /* 157-byte string literal not displayed */
	Shippable   bool              `protobuf:"varint,7,opt,name=shippable,proto3" json:"shippable,omitempty"`
	Url         string            `protobuf:"bytes,8,opt,name=url,proto3" json:"url,omitempty"`
	// 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() []string

func (*NewRequest) GetDescription

func (x *NewRequest) GetDescription() string

func (*NewRequest) GetImages

func (x *NewRequest) GetImages() []string

func (*NewRequest) GetMetadata

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

func (*NewRequest) GetName

func (x *NewRequest) GetName() string

func (*NewRequest) GetShippable

func (x *NewRequest) GetShippable() bool

func (*NewRequest) GetUrl

func (x *NewRequest) GetUrl() string

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 Product

type Product 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"`
	Active      bool              `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"`
	Attributes  []string          `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"`
	Description string            `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	Images      []string          `protobuf:"bytes,6,rep,name=images,proto3" json:"images,omitempty"`
	Metadata    map[string]string `` /* 157-byte string literal not displayed */
	Shippable   bool              `protobuf:"varint,8,opt,name=shippable,proto3" json:"shippable,omitempty"`
	Url         string            `protobuf:"bytes,9,opt,name=url,proto3" json:"url,omitempty"`
	Skus        []*skupb.Sku      `protobuf:"bytes,10,rep,name=skus,proto3" json:"skus,omitempty"`
	Type        Category          `protobuf:"varint,11,opt,name=type,proto3,enum=productpb.Category" json:"type,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 (*Product) Descriptor deprecated

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

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetActive

func (x *Product) GetActive() bool

func (*Product) GetAttributes

func (x *Product) GetAttributes() []string

func (*Product) GetCreated

func (x *Product) GetCreated() int64

func (*Product) GetDescription

func (x *Product) GetDescription() string

func (*Product) GetId

func (x *Product) GetId() string

func (*Product) GetImages

func (x *Product) GetImages() []string

func (*Product) GetMetadata

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

func (*Product) GetName

func (x *Product) GetName() string

func (*Product) GetShippable

func (x *Product) GetShippable() bool

func (*Product) GetSkus

func (x *Product) GetSkus() []*skupb.Sku

func (*Product) GetType

func (x *Product) GetType() Category

func (*Product) GetUpdated

func (x *Product) GetUpdated() int64

func (*Product) GetUrl

func (x *Product) GetUrl() string

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) ProtoReflect

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

func (*Product) Reset

func (x *Product) Reset()

func (*Product) String

func (x *Product) String() string

type ProductServiceClient

type ProductServiceClient interface {
	New(ctx context.Context, in *NewRequest, opts ...grpc.CallOption) (*Product, error)
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Product, error)
	Update(ctx context.Context, in *UpdateRequest, opts ...grpc.CallOption) (*Product, error)
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*Empty, error)
}

ProductServiceClient is the client API for ProductService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type ProductServiceServer

type ProductServiceServer interface {
	New(context.Context, *NewRequest) (*Product, error)
	Get(context.Context, *GetRequest) (*Product, error)
	Update(context.Context, *UpdateRequest) (*Product, error)
	Delete(context.Context, *DeleteRequest) (*Empty, error)
}

ProductServiceServer is the server API for ProductService service.

type UnimplementedProductServiceServer

type UnimplementedProductServiceServer struct {
}

UnimplementedProductServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedProductServiceServer) Delete

func (*UnimplementedProductServiceServer) Get

func (*UnimplementedProductServiceServer) New

func (*UnimplementedProductServiceServer) 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"`
	Active      bool              `protobuf:"varint,3,opt,name=active,proto3" json:"active,omitempty"`
	Attributes  []string          `protobuf:"bytes,4,rep,name=attributes,proto3" json:"attributes,omitempty"`
	Description string            `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
	Images      []string          `protobuf:"bytes,6,rep,name=images,proto3" json:"images,omitempty"`
	Metadata    map[string]string `` /* 157-byte string literal not displayed */
	Shippable   bool              `protobuf:"varint,8,opt,name=shippable,proto3" json:"shippable,omitempty"`
	Url         string            `protobuf:"bytes,9,opt,name=url,proto3" json:"url,omitempty"`
	// 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() []string

func (*UpdateRequest) GetDescription

func (x *UpdateRequest) GetDescription() string

func (*UpdateRequest) GetId

func (x *UpdateRequest) GetId() string

func (*UpdateRequest) GetImages

func (x *UpdateRequest) GetImages() []string

func (*UpdateRequest) GetMetadata

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

func (*UpdateRequest) GetName

func (x *UpdateRequest) GetName() string

func (*UpdateRequest) GetShippable

func (x *UpdateRequest) GetShippable() bool

func (*UpdateRequest) GetUrl

func (x *UpdateRequest) GetUrl() string

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