Documentation ¶
Index ¶
- Variables
- func RegisterProductServiceServer(s *grpc.Server, srv ProductServiceServer)
- type Category
- type DeleteRequest
- type Empty
- type GetRequest
- type NewRequest
- func (*NewRequest) Descriptor() ([]byte, []int)deprecated
- func (x *NewRequest) GetActive() bool
- func (x *NewRequest) GetAttributes() []string
- func (x *NewRequest) GetDescription() string
- func (x *NewRequest) GetId() string
- func (x *NewRequest) GetImages() []string
- func (x *NewRequest) GetMetadata() map[string]string
- func (x *NewRequest) GetName() string
- func (x *NewRequest) GetShippable() bool
- func (x *NewRequest) GetUrl() string
- func (*NewRequest) ProtoMessage()
- func (x *NewRequest) ProtoReflect() protoreflect.Message
- func (x *NewRequest) Reset()
- func (x *NewRequest) String() string
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetActive() bool
- func (x *Product) GetAttributes() []string
- func (x *Product) GetCreated() int64
- func (x *Product) GetDescription() string
- func (x *Product) GetId() string
- func (x *Product) GetImages() []string
- func (x *Product) GetMetadata() map[string]string
- func (x *Product) GetName() string
- func (x *Product) GetShippable() bool
- func (x *Product) GetSkus() []*skupb.Sku
- func (x *Product) GetType() Category
- func (x *Product) GetUpdated() int64
- func (x *Product) GetUrl() string
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductServiceClient
- type ProductServiceServer
- type UnimplementedProductServiceServer
- func (*UnimplementedProductServiceServer) Delete(context.Context, *DeleteRequest) (*Empty, error)
- func (*UnimplementedProductServiceServer) Get(context.Context, *GetRequest) (*Product, error)
- func (*UnimplementedProductServiceServer) New(context.Context, *NewRequest) (*Product, error)
- func (*UnimplementedProductServiceServer) Update(context.Context, *UpdateRequest) (*Product, error)
- type UpdateRequest
- func (*UpdateRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateRequest) GetActive() bool
- func (x *UpdateRequest) GetAttributes() []string
- func (x *UpdateRequest) GetDescription() string
- func (x *UpdateRequest) GetId() string
- func (x *UpdateRequest) GetImages() []string
- func (x *UpdateRequest) GetMetadata() map[string]string
- func (x *UpdateRequest) GetName() string
- func (x *UpdateRequest) GetShippable() bool
- func (x *UpdateRequest) GetUrl() string
- func (*UpdateRequest) ProtoMessage()
- func (x *UpdateRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateRequest) Reset()
- func (x *UpdateRequest) String() string
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
func (Category) Descriptor ¶
func (Category) Descriptor() protoreflect.EnumDescriptor
func (Category) EnumDescriptor
deprecated
func (Category) Number ¶
func (x Category) Number() protoreflect.EnumNumber
func (Category) Type ¶
func (Category) Type() protoreflect.EnumType
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 NewRequest ¶
type NewRequest 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"` 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"` Attributes []string `protobuf:"bytes,9,rep,name=attributes,proto3" json:"attributes,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) GetId ¶
func (x *NewRequest) GetId() 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) GetAttributes ¶
func (*Product) GetCreated ¶
func (*Product) GetDescription ¶
func (*Product) GetMetadata ¶
func (*Product) GetShippable ¶
func (*Product) GetUpdated ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
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.
func NewProductServiceClient ¶
func NewProductServiceClient(cc grpc.ClientConnInterface) ProductServiceClient
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 cfg API for ProductService service.
type UnimplementedProductServiceServer ¶
type UnimplementedProductServiceServer struct { }
UnimplementedProductServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedProductServiceServer) Delete ¶
func (*UnimplementedProductServiceServer) Delete(context.Context, *DeleteRequest) (*Empty, error)
func (*UnimplementedProductServiceServer) Get ¶
func (*UnimplementedProductServiceServer) Get(context.Context, *GetRequest) (*Product, error)
func (*UnimplementedProductServiceServer) New ¶
func (*UnimplementedProductServiceServer) New(context.Context, *NewRequest) (*Product, error)
func (*UnimplementedProductServiceServer) Update ¶
func (*UnimplementedProductServiceServer) Update(context.Context, *UpdateRequest) (*Product, 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"` 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
Click to show internal directories.
Click to hide internal directories.