ecommerce

package
v0.0.0-...-a9387d7 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_ecommerce_product_info_proto protoreflect.FileDescriptor

Functions

func RegisterProductInfoServer

func RegisterProductInfoServer(s *grpc.Server, srv ProductInfoServer)

Types

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"`
	Description string  `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Price       float32 `protobuf:"fixed32,4,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*Product) Descriptor deprecated

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

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetDescription

func (x *Product) GetDescription() string

func (*Product) GetId

func (x *Product) GetId() string

func (*Product) GetName

func (x *Product) GetName() string

func (*Product) GetPrice

func (x *Product) GetPrice() float32

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 ProductID

type ProductID struct {
	Value string `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*ProductID) Descriptor deprecated

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

Deprecated: Use ProductID.ProtoReflect.Descriptor instead.

func (*ProductID) GetValue

func (x *ProductID) GetValue() string

func (*ProductID) ProtoMessage

func (*ProductID) ProtoMessage()

func (*ProductID) ProtoReflect

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

func (*ProductID) Reset

func (x *ProductID) Reset()

func (*ProductID) String

func (x *ProductID) String() string

type ProductInfoClient

type ProductInfoClient interface {
	AddProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*ProductID, error)
	GetProduct(ctx context.Context, in *ProductID, opts ...grpc.CallOption) (*Product, error)
}

ProductInfoClient is the client API for ProductInfo service.

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

type ProductInfoServer

type ProductInfoServer interface {
	AddProduct(context.Context, *Product) (*ProductID, error)
	GetProduct(context.Context, *ProductID) (*Product, error)
}

ProductInfoServer is the server API for ProductInfo service.

type UnimplementedProductInfoServer

type UnimplementedProductInfoServer struct {
}

UnimplementedProductInfoServer can be embedded to have forward compatible implementations.

func (*UnimplementedProductInfoServer) AddProduct

func (*UnimplementedProductInfoServer) GetProduct

Jump to

Keyboard shortcuts

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