Documentation ¶
Overview ¶
Package product is a reverse proxy.
It translates gRPC into GraphQL.
Index ¶
- func RegisterGQLObjectTypes(mux *runtime.ServeMux)
- func RegisterProductServiceFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProductServiceHandler(mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProductServiceHandlerClient(mux *runtime.ServeMux, client ProductServiceClient) error
- func RegisterProductServiceServer(s *grpc.Server, srv ProductServiceServer)
- type GetProductRequest
- func (*GetProductRequest) Descriptor() ([]byte, []int)
- func (m *GetProductRequest) GetUpc() string
- func (*GetProductRequest) ProtoMessage()
- func (m *GetProductRequest) Reset()
- func (m *GetProductRequest) String() string
- func (m *GetProductRequest) XXX_DiscardUnknown()
- func (m *GetProductRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetProductRequest) XXX_Merge(src proto.Message)
- func (m *GetProductRequest) XXX_Size() int
- func (m *GetProductRequest) XXX_Unmarshal(b []byte) error
- type GetProductResponse
- func (*GetProductResponse) Descriptor() ([]byte, []int)
- func (m *GetProductResponse) GetProducts() *Product
- func (*GetProductResponse) ProtoMessage()
- func (m *GetProductResponse) Reset()
- func (m *GetProductResponse) String() string
- func (m *GetProductResponse) XXX_DiscardUnknown()
- func (m *GetProductResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetProductResponse) XXX_Merge(src proto.Message)
- func (m *GetProductResponse) XXX_Size() int
- func (m *GetProductResponse) XXX_Unmarshal(b []byte) error
- type Product
- func (*Product) Descriptor() ([]byte, []int)
- func (m *Product) GetName() string
- func (m *Product) GetPrice() int32
- func (m *Product) GetUpc() string
- func (*Product) ProtoMessage()
- func (m *Product) Reset()
- func (m *Product) String() string
- func (m *Product) XXX_DiscardUnknown()
- func (m *Product) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Product) XXX_Merge(src proto.Message)
- func (m *Product) XXX_Size() int
- func (m *Product) XXX_Unmarshal(b []byte) error
- type ProductServiceClient
- type ProductServiceServer
- type TopProductsRequest
- func (*TopProductsRequest) Descriptor() ([]byte, []int)
- func (*TopProductsRequest) ProtoMessage()
- func (m *TopProductsRequest) Reset()
- func (m *TopProductsRequest) String() string
- func (m *TopProductsRequest) XXX_DiscardUnknown()
- func (m *TopProductsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TopProductsRequest) XXX_Merge(src proto.Message)
- func (m *TopProductsRequest) XXX_Size() int
- func (m *TopProductsRequest) XXX_Unmarshal(b []byte) error
- type TopProductsResponse
- func (*TopProductsResponse) Descriptor() ([]byte, []int)
- func (m *TopProductsResponse) GetProducts() []*Product
- func (*TopProductsResponse) ProtoMessage()
- func (m *TopProductsResponse) Reset()
- func (m *TopProductsResponse) String() string
- func (m *TopProductsResponse) XXX_DiscardUnknown()
- func (m *TopProductsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TopProductsResponse) XXX_Merge(src proto.Message)
- func (m *TopProductsResponse) XXX_Size() int
- func (m *TopProductsResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterGQLObjectTypes ¶
func RegisterProductServiceHandler ¶
func RegisterProductServiceHandler(mux *runtime.ServeMux, conn *grpc.ClientConn) error
func RegisterProductServiceHandlerClient ¶
func RegisterProductServiceHandlerClient(mux *runtime.ServeMux, client ProductServiceClient) error
func RegisterProductServiceServer ¶
func RegisterProductServiceServer(s *grpc.Server, srv ProductServiceServer)
Types ¶
type GetProductRequest ¶
type GetProductRequest struct { Upc string `protobuf:"bytes,1,opt,name=upc,proto3" json:"upc,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetProductRequest) Descriptor ¶
func (*GetProductRequest) Descriptor() ([]byte, []int)
func (*GetProductRequest) GetUpc ¶
func (m *GetProductRequest) GetUpc() 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 GetProductResponse ¶
type GetProductResponse struct { Products *Product `protobuf:"bytes,1,opt,name=products,proto3" json:"products,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetProductResponse) Descriptor ¶
func (*GetProductResponse) Descriptor() ([]byte, []int)
func (*GetProductResponse) GetProducts ¶
func (m *GetProductResponse) GetProducts() *Product
func (*GetProductResponse) ProtoMessage ¶
func (*GetProductResponse) ProtoMessage()
func (*GetProductResponse) Reset ¶
func (m *GetProductResponse) Reset()
func (*GetProductResponse) String ¶
func (m *GetProductResponse) String() string
func (*GetProductResponse) XXX_DiscardUnknown ¶
func (m *GetProductResponse) XXX_DiscardUnknown()
func (*GetProductResponse) XXX_Marshal ¶
func (m *GetProductResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetProductResponse) XXX_Merge ¶
func (m *GetProductResponse) XXX_Merge(src proto.Message)
func (*GetProductResponse) XXX_Size ¶
func (m *GetProductResponse) XXX_Size() int
func (*GetProductResponse) XXX_Unmarshal ¶
func (m *GetProductResponse) XXX_Unmarshal(b []byte) error
type Product ¶
type Product struct { Upc string `protobuf:"bytes,1,opt,name=upc,proto3" json:"upc,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Price int32 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Product) Descriptor ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) XXX_DiscardUnknown ¶
func (m *Product) XXX_DiscardUnknown()
func (*Product) XXX_Marshal ¶
func (*Product) XXX_Unmarshal ¶
type ProductServiceClient ¶
type ProductServiceClient interface { TopProducts(ctx context.Context, in *TopProductsRequest, opts ...grpc.CallOption) (*TopProductsResponse, error) GetProduct(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*GetProductResponse, 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.ClientConn) ProductServiceClient
type ProductServiceServer ¶
type ProductServiceServer interface { TopProducts(context.Context, *TopProductsRequest) (*TopProductsResponse, error) GetProduct(context.Context, *GetProductRequest) (*GetProductResponse, error) }
ProductServiceServer is the server API for ProductService service.
type TopProductsRequest ¶
type TopProductsRequest struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TopProductsRequest) Descriptor ¶
func (*TopProductsRequest) Descriptor() ([]byte, []int)
func (*TopProductsRequest) ProtoMessage ¶
func (*TopProductsRequest) ProtoMessage()
func (*TopProductsRequest) Reset ¶
func (m *TopProductsRequest) Reset()
func (*TopProductsRequest) String ¶
func (m *TopProductsRequest) String() string
func (*TopProductsRequest) XXX_DiscardUnknown ¶
func (m *TopProductsRequest) XXX_DiscardUnknown()
func (*TopProductsRequest) XXX_Marshal ¶
func (m *TopProductsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TopProductsRequest) XXX_Merge ¶
func (m *TopProductsRequest) XXX_Merge(src proto.Message)
func (*TopProductsRequest) XXX_Size ¶
func (m *TopProductsRequest) XXX_Size() int
func (*TopProductsRequest) XXX_Unmarshal ¶
func (m *TopProductsRequest) XXX_Unmarshal(b []byte) error
type TopProductsResponse ¶
type TopProductsResponse 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 (*TopProductsResponse) Descriptor ¶
func (*TopProductsResponse) Descriptor() ([]byte, []int)
func (*TopProductsResponse) GetProducts ¶
func (m *TopProductsResponse) GetProducts() []*Product
func (*TopProductsResponse) ProtoMessage ¶
func (*TopProductsResponse) ProtoMessage()
func (*TopProductsResponse) Reset ¶
func (m *TopProductsResponse) Reset()
func (*TopProductsResponse) String ¶
func (m *TopProductsResponse) String() string
func (*TopProductsResponse) XXX_DiscardUnknown ¶
func (m *TopProductsResponse) XXX_DiscardUnknown()
func (*TopProductsResponse) XXX_Marshal ¶
func (m *TopProductsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TopProductsResponse) XXX_Merge ¶
func (m *TopProductsResponse) XXX_Merge(src proto.Message)
func (*TopProductsResponse) XXX_Size ¶
func (m *TopProductsResponse) XXX_Size() int
func (*TopProductsResponse) XXX_Unmarshal ¶
func (m *TopProductsResponse) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.