demoshop

package
v0.0.0-...-7242625 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProductCatalogServiceServer

func RegisterProductCatalogServiceServer(s *grpc.Server, srv ProductCatalogServiceServer)

func RegisterRecommendationServiceServer

func RegisterRecommendationServiceServer(s *grpc.Server, srv RecommendationServiceServer)

Types

type Empty

type Empty struct {
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

=============== Common messages ===============

func (*Empty) Descriptor

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

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) Reset

func (m *Empty) Reset()

func (*Empty) String

func (m *Empty) String() string

func (*Empty) XXX_DiscardUnknown

func (m *Empty) XXX_DiscardUnknown()

func (*Empty) XXX_Marshal

func (m *Empty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Empty) XXX_Merge

func (m *Empty) XXX_Merge(src proto.Message)

func (*Empty) XXX_Size

func (m *Empty) XXX_Size() int

func (*Empty) XXX_Unmarshal

func (m *Empty) XXX_Unmarshal(b []byte) error

type GetProductRequest

type GetProductRequest struct {
	Id                   string   `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GetProductRequest) Descriptor

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

func (*GetProductRequest) GetId

func (m *GetProductRequest) GetId() string

func (*GetProductRequest) ProtoMessage

func (*GetProductRequest) ProtoMessage()

func (*GetProductRequest) Reset

func (m *GetProductRequest) Reset()

func (*GetProductRequest) String

func (m *GetProductRequest) String() string

func (*GetProductRequest) XXX_DiscardUnknown

func (m *GetProductRequest) XXX_DiscardUnknown()

func (*GetProductRequest) XXX_Marshal

func (m *GetProductRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetProductRequest) XXX_Merge

func (m *GetProductRequest) XXX_Merge(src proto.Message)

func (*GetProductRequest) XXX_Size

func (m *GetProductRequest) XXX_Size() int

func (*GetProductRequest) XXX_Unmarshal

func (m *GetProductRequest) XXX_Unmarshal(b []byte) error

type ListProductsResponse

type ListProductsResponse struct {
	Products             []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*ListProductsResponse) Descriptor

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

func (*ListProductsResponse) GetProducts

func (m *ListProductsResponse) GetProducts() []*Product

func (*ListProductsResponse) ProtoMessage

func (*ListProductsResponse) ProtoMessage()

func (*ListProductsResponse) Reset

func (m *ListProductsResponse) Reset()

func (*ListProductsResponse) String

func (m *ListProductsResponse) String() string

func (*ListProductsResponse) XXX_DiscardUnknown

func (m *ListProductsResponse) XXX_DiscardUnknown()

func (*ListProductsResponse) XXX_Marshal

func (m *ListProductsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListProductsResponse) XXX_Merge

func (m *ListProductsResponse) XXX_Merge(src proto.Message)

func (*ListProductsResponse) XXX_Size

func (m *ListProductsResponse) XXX_Size() int

func (*ListProductsResponse) XXX_Unmarshal

func (m *ListProductsResponse) XXX_Unmarshal(b []byte) error

type ListRecommendationsRequest

type ListRecommendationsRequest struct {
	UserId               string   `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	ProductIds           []string `protobuf:"bytes,2,rep,name=product_ids,json=productIds,proto3" json:"product_ids,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListRecommendationsRequest) Descriptor

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

func (*ListRecommendationsRequest) GetProductIds

func (m *ListRecommendationsRequest) GetProductIds() []string

func (*ListRecommendationsRequest) GetUserId

func (m *ListRecommendationsRequest) GetUserId() string

func (*ListRecommendationsRequest) ProtoMessage

func (*ListRecommendationsRequest) ProtoMessage()

func (*ListRecommendationsRequest) Reset

func (m *ListRecommendationsRequest) Reset()

func (*ListRecommendationsRequest) String

func (m *ListRecommendationsRequest) String() string

func (*ListRecommendationsRequest) XXX_DiscardUnknown

func (m *ListRecommendationsRequest) XXX_DiscardUnknown()

func (*ListRecommendationsRequest) XXX_Marshal

func (m *ListRecommendationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListRecommendationsRequest) XXX_Merge

func (m *ListRecommendationsRequest) XXX_Merge(src proto.Message)

func (*ListRecommendationsRequest) XXX_Size

func (m *ListRecommendationsRequest) XXX_Size() int

func (*ListRecommendationsRequest) XXX_Unmarshal

func (m *ListRecommendationsRequest) XXX_Unmarshal(b []byte) error

type ListRecommendationsResponse

type ListRecommendationsResponse struct {
	ProductIds           []string `protobuf:"bytes,1,rep,name=product_ids,json=productIds,proto3" json:"product_ids,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ListRecommendationsResponse) Descriptor

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

func (*ListRecommendationsResponse) GetProductIds

func (m *ListRecommendationsResponse) GetProductIds() []string

func (*ListRecommendationsResponse) ProtoMessage

func (*ListRecommendationsResponse) ProtoMessage()

func (*ListRecommendationsResponse) Reset

func (m *ListRecommendationsResponse) Reset()

func (*ListRecommendationsResponse) String

func (m *ListRecommendationsResponse) String() string

func (*ListRecommendationsResponse) XXX_DiscardUnknown

func (m *ListRecommendationsResponse) XXX_DiscardUnknown()

func (*ListRecommendationsResponse) XXX_Marshal

func (m *ListRecommendationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListRecommendationsResponse) XXX_Merge

func (m *ListRecommendationsResponse) XXX_Merge(src proto.Message)

func (*ListRecommendationsResponse) XXX_Size

func (m *ListRecommendationsResponse) XXX_Size() int

func (*ListRecommendationsResponse) XXX_Unmarshal

func (m *ListRecommendationsResponse) XXX_Unmarshal(b []byte) error

type Money

type Money struct {
	// 3-letter currency code defined in ISO 4217
	CurrencyCode string `protobuf:"bytes,1,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"`
	// The whole units of the amount.
	Units int64 `protobuf:"varint,2,opt,name=units,proto3" json:"units,omitempty"`
	// Between -999,999,999 and +999,999,999.
	Nanos                int32    `protobuf:"varint,3,opt,name=nanos,proto3" json:"nanos,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

Represents an amount of money with its currency type. ie: $1.75 USD: current_code = USD, units = -1, nanos = -750,000,000

func (*Money) Descriptor

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

func (*Money) GetCurrencyCode

func (m *Money) GetCurrencyCode() string

func (*Money) GetNanos

func (m *Money) GetNanos() int32

func (*Money) GetUnits

func (m *Money) GetUnits() int64

func (*Money) ProtoMessage

func (*Money) ProtoMessage()

func (*Money) Reset

func (m *Money) Reset()

func (*Money) String

func (m *Money) String() string

func (*Money) XXX_DiscardUnknown

func (m *Money) XXX_DiscardUnknown()

func (*Money) XXX_Marshal

func (m *Money) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Money) XXX_Merge

func (m *Money) XXX_Merge(src proto.Message)

func (*Money) XXX_Size

func (m *Money) XXX_Size() int

func (*Money) XXX_Unmarshal

func (m *Money) XXX_Unmarshal(b []byte) error

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"`
	Picture              string   `protobuf:"bytes,4,opt,name=picture,proto3" json:"picture,omitempty"`
	PriceUsd             *Money   `protobuf:"bytes,5,opt,name=price_usd,json=priceUsd,proto3" json:"price_usd,omitempty"`
	Categories           []string `protobuf:"bytes,6,rep,name=categories,proto3" json:"categories,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Product) Descriptor

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

func (*Product) GetCategories

func (m *Product) GetCategories() []string

func (*Product) GetDescription

func (m *Product) GetDescription() string

func (*Product) GetId

func (m *Product) GetId() string

func (*Product) GetName

func (m *Product) GetName() string

func (*Product) GetPicture

func (m *Product) GetPicture() string

func (*Product) GetPriceUsd

func (m *Product) GetPriceUsd() *Money

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) Reset

func (m *Product) Reset()

func (*Product) String

func (m *Product) String() string

func (*Product) XXX_DiscardUnknown

func (m *Product) XXX_DiscardUnknown()

func (*Product) XXX_Marshal

func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Product) XXX_Merge

func (m *Product) XXX_Merge(src proto.Message)

func (*Product) XXX_Size

func (m *Product) XXX_Size() int

func (*Product) XXX_Unmarshal

func (m *Product) XXX_Unmarshal(b []byte) error

type ProductCatalogServiceClient

type ProductCatalogServiceClient interface {
	ListProducts(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListProductsResponse, error)
	GetProduct(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*Product, error)
	SearchProducts(ctx context.Context, in *SearchProductsRequest, opts ...grpc.CallOption) (*SearchProductsResponse, error)
}

ProductCatalogServiceClient is the client API for ProductCatalogService service.

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

func NewProductCatalogServiceClient

func NewProductCatalogServiceClient(cc *grpc.ClientConn) ProductCatalogServiceClient

type ProductCatalogServiceServer

type ProductCatalogServiceServer interface {
	ListProducts(context.Context, *Empty) (*ListProductsResponse, error)
	GetProduct(context.Context, *GetProductRequest) (*Product, error)
	SearchProducts(context.Context, *SearchProductsRequest) (*SearchProductsResponse, error)
}

ProductCatalogServiceServer is the server API for ProductCatalogService service.

type RecommendationServiceClient

type RecommendationServiceClient interface {
	ListRecommendations(ctx context.Context, in *ListRecommendationsRequest, opts ...grpc.CallOption) (*ListRecommendationsResponse, error)
}

RecommendationServiceClient is the client API for RecommendationService service.

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

func NewRecommendationServiceClient

func NewRecommendationServiceClient(cc *grpc.ClientConn) RecommendationServiceClient

type RecommendationServiceServer

type RecommendationServiceServer interface {
	ListRecommendations(context.Context, *ListRecommendationsRequest) (*ListRecommendationsResponse, error)
}

RecommendationServiceServer is the server API for RecommendationService service.

type SearchProductsRequest

type SearchProductsRequest struct {
	Query                string   `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SearchProductsRequest) Descriptor

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

func (*SearchProductsRequest) GetQuery

func (m *SearchProductsRequest) GetQuery() string

func (*SearchProductsRequest) ProtoMessage

func (*SearchProductsRequest) ProtoMessage()

func (*SearchProductsRequest) Reset

func (m *SearchProductsRequest) Reset()

func (*SearchProductsRequest) String

func (m *SearchProductsRequest) String() string

func (*SearchProductsRequest) XXX_DiscardUnknown

func (m *SearchProductsRequest) XXX_DiscardUnknown()

func (*SearchProductsRequest) XXX_Marshal

func (m *SearchProductsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchProductsRequest) XXX_Merge

func (m *SearchProductsRequest) XXX_Merge(src proto.Message)

func (*SearchProductsRequest) XXX_Size

func (m *SearchProductsRequest) XXX_Size() int

func (*SearchProductsRequest) XXX_Unmarshal

func (m *SearchProductsRequest) XXX_Unmarshal(b []byte) error

type SearchProductsResponse

type SearchProductsResponse struct {
	Results              []*Product `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
	XXX_unrecognized     []byte     `json:"-"`
	XXX_sizecache        int32      `json:"-"`
}

func (*SearchProductsResponse) Descriptor

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

func (*SearchProductsResponse) GetResults

func (m *SearchProductsResponse) GetResults() []*Product

func (*SearchProductsResponse) ProtoMessage

func (*SearchProductsResponse) ProtoMessage()

func (*SearchProductsResponse) Reset

func (m *SearchProductsResponse) Reset()

func (*SearchProductsResponse) String

func (m *SearchProductsResponse) String() string

func (*SearchProductsResponse) XXX_DiscardUnknown

func (m *SearchProductsResponse) XXX_DiscardUnknown()

func (*SearchProductsResponse) XXX_Marshal

func (m *SearchProductsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SearchProductsResponse) XXX_Merge

func (m *SearchProductsResponse) XXX_Merge(src proto.Message)

func (*SearchProductsResponse) XXX_Size

func (m *SearchProductsResponse) XXX_Size() int

func (*SearchProductsResponse) XXX_Unmarshal

func (m *SearchProductsResponse) XXX_Unmarshal(b []byte) error

type UnimplementedProductCatalogServiceServer

type UnimplementedProductCatalogServiceServer struct {
}

UnimplementedProductCatalogServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedProductCatalogServiceServer) GetProduct

func (*UnimplementedProductCatalogServiceServer) ListProducts

func (*UnimplementedProductCatalogServiceServer) SearchProducts

type UnimplementedRecommendationServiceServer

type UnimplementedRecommendationServiceServer struct {
}

UnimplementedRecommendationServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedRecommendationServiceServer) ListRecommendations

Jump to

Keyboard shortcuts

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