pb

package
v0.0.0-...-a10cf02 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cart_Status_name = map[int32]string{
	0: "NONE",
	1: "CREATED",
	2: "PLACED",
	3: "SHIPPED",
}
View Source
var Cart_Status_value = map[string]int32{
	"NONE":    0,
	"CREATED": 1,
	"PLACED":  2,
	"SHIPPED": 3,
}

Functions

func RegisterCartServiceServer

func RegisterCartServiceServer(s *grpc.Server, srv CartServiceServer)

func RegisterCheckoutServiceServer

func RegisterCheckoutServiceServer(s *grpc.Server, srv CheckoutServiceServer)

func RegisterGCDServiceServer

func RegisterGCDServiceServer(s *grpc.Server, srv GCDServiceServer)

func RegisterProductServiceServer

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

Types

type Cart

type Cart struct {
	Id                   string           `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Description          string           `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Products             map[string]int32 `` /* 158-byte string literal not displayed */
	TotalItems           int32            `protobuf:"varint,4,opt,name=totalItems,proto3" json:"totalItems,omitempty"`
	TotalCost            float64          `protobuf:"fixed64,5,opt,name=totalCost,proto3" json:"totalCost,omitempty"`
	Status               Cart_Status      `protobuf:"varint,6,opt,name=status,proto3,enum=pb.Cart_Status" json:"status,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*Cart) Descriptor

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

func (*Cart) GetDescription

func (m *Cart) GetDescription() string

func (*Cart) GetId

func (m *Cart) GetId() string

func (*Cart) GetProducts

func (m *Cart) GetProducts() map[string]int32

func (*Cart) GetStatus

func (m *Cart) GetStatus() Cart_Status

func (*Cart) GetTotalCost

func (m *Cart) GetTotalCost() float64

func (*Cart) GetTotalItems

func (m *Cart) GetTotalItems() int32

func (*Cart) ProtoMessage

func (*Cart) ProtoMessage()

func (*Cart) Reset

func (m *Cart) Reset()

func (*Cart) String

func (m *Cart) String() string

func (*Cart) XXX_DiscardUnknown

func (m *Cart) XXX_DiscardUnknown()

func (*Cart) XXX_Marshal

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

func (*Cart) XXX_Merge

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

func (*Cart) XXX_Size

func (m *Cart) XXX_Size() int

func (*Cart) XXX_Unmarshal

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

type CartId

type CartId 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 (*CartId) Descriptor

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

func (*CartId) GetId

func (m *CartId) GetId() string

func (*CartId) ProtoMessage

func (*CartId) ProtoMessage()

func (*CartId) Reset

func (m *CartId) Reset()

func (*CartId) String

func (m *CartId) String() string

func (*CartId) XXX_DiscardUnknown

func (m *CartId) XXX_DiscardUnknown()

func (*CartId) XXX_Marshal

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

func (*CartId) XXX_Merge

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

func (*CartId) XXX_Size

func (m *CartId) XXX_Size() int

func (*CartId) XXX_Unmarshal

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

type CartQuantity

type CartQuantity struct {
	CartId               string   `protobuf:"bytes,1,opt,name=cartId,proto3" json:"cartId,omitempty"`
	ProductId            string   `protobuf:"bytes,2,opt,name=productId,proto3" json:"productId,omitempty"`
	Quantity             int32    `protobuf:"varint,3,opt,name=quantity,proto3" json:"quantity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*CartQuantity) Descriptor

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

func (*CartQuantity) GetCartId

func (m *CartQuantity) GetCartId() string

func (*CartQuantity) GetProductId

func (m *CartQuantity) GetProductId() string

func (*CartQuantity) GetQuantity

func (m *CartQuantity) GetQuantity() int32

func (*CartQuantity) ProtoMessage

func (*CartQuantity) ProtoMessage()

func (*CartQuantity) Reset

func (m *CartQuantity) Reset()

func (*CartQuantity) String

func (m *CartQuantity) String() string

func (*CartQuantity) XXX_DiscardUnknown

func (m *CartQuantity) XXX_DiscardUnknown()

func (*CartQuantity) XXX_Marshal

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

func (*CartQuantity) XXX_Merge

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

func (*CartQuantity) XXX_Size

func (m *CartQuantity) XXX_Size() int

func (*CartQuantity) XXX_Unmarshal

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

type CartServiceClient

type CartServiceClient interface {
	Create(ctx context.Context, in *Cart, opts ...grpc.CallOption) (*Cart, error)
	FindOne(ctx context.Context, in *CartId, opts ...grpc.CallOption) (*Cart, error)
	FindAll(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (CartService_FindAllClient, error)
	Update(ctx context.Context, in *Cart, opts ...grpc.CallOption) (*Cart, error)
	Delete(ctx context.Context, in *CartId, opts ...grpc.CallOption) (*empty.Empty, error)
	AddToCart(ctx context.Context, in *CartQuantity, opts ...grpc.CallOption) (*Cart, error)
	RemoveFromCart(ctx context.Context, in *CartQuantity, opts ...grpc.CallOption) (*Cart, error)
}

CartServiceClient is the client API for CartService service.

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

func NewCartServiceClient

func NewCartServiceClient(cc *grpc.ClientConn) CartServiceClient

type CartServiceServer

type CartServiceServer interface {
	Create(context.Context, *Cart) (*Cart, error)
	FindOne(context.Context, *CartId) (*Cart, error)
	FindAll(*empty.Empty, CartService_FindAllServer) error
	Update(context.Context, *Cart) (*Cart, error)
	Delete(context.Context, *CartId) (*empty.Empty, error)
	AddToCart(context.Context, *CartQuantity) (*Cart, error)
	RemoveFromCart(context.Context, *CartQuantity) (*Cart, error)
}

CartServiceServer is the server API for CartService service.

type CartService_FindAllClient

type CartService_FindAllClient interface {
	Recv() (*Cart, error)
	grpc.ClientStream
}

type CartService_FindAllServer

type CartService_FindAllServer interface {
	Send(*Cart) error
	grpc.ServerStream
}

type Cart_Status

type Cart_Status int32
const (
	Cart_NONE    Cart_Status = 0
	Cart_CREATED Cart_Status = 1
	Cart_PLACED  Cart_Status = 2
	Cart_SHIPPED Cart_Status = 3
)

func (Cart_Status) EnumDescriptor

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

func (Cart_Status) String

func (x Cart_Status) String() string

type CheckoutInput

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

func (*CheckoutInput) Descriptor

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

func (*CheckoutInput) GetCartId

func (m *CheckoutInput) GetCartId() string

func (*CheckoutInput) ProtoMessage

func (*CheckoutInput) ProtoMessage()

func (*CheckoutInput) Reset

func (m *CheckoutInput) Reset()

func (*CheckoutInput) String

func (m *CheckoutInput) String() string

func (*CheckoutInput) XXX_DiscardUnknown

func (m *CheckoutInput) XXX_DiscardUnknown()

func (*CheckoutInput) XXX_Marshal

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

func (*CheckoutInput) XXX_Merge

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

func (*CheckoutInput) XXX_Size

func (m *CheckoutInput) XXX_Size() int

func (*CheckoutInput) XXX_Unmarshal

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

type CheckoutServiceClient

type CheckoutServiceClient interface {
	Checkout(ctx context.Context, in *CheckoutInput, opts ...grpc.CallOption) (*empty.Empty, error)
}

CheckoutServiceClient is the client API for CheckoutService service.

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

func NewCheckoutServiceClient

func NewCheckoutServiceClient(cc *grpc.ClientConn) CheckoutServiceClient

type CheckoutServiceServer

type CheckoutServiceServer interface {
	Checkout(context.Context, *CheckoutInput) (*empty.Empty, error)
}

CheckoutServiceServer is the server API for CheckoutService service.

type GCDRequest

type GCDRequest struct {
	A                    uint64   `protobuf:"varint,1,opt,name=a,proto3" json:"a,omitempty"`
	B                    uint64   `protobuf:"varint,2,opt,name=b,proto3" json:"b,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GCDRequest) Descriptor

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

func (*GCDRequest) GetA

func (m *GCDRequest) GetA() uint64

func (*GCDRequest) GetB

func (m *GCDRequest) GetB() uint64

func (*GCDRequest) ProtoMessage

func (*GCDRequest) ProtoMessage()

func (*GCDRequest) Reset

func (m *GCDRequest) Reset()

func (*GCDRequest) String

func (m *GCDRequest) String() string

func (*GCDRequest) XXX_DiscardUnknown

func (m *GCDRequest) XXX_DiscardUnknown()

func (*GCDRequest) XXX_Marshal

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

func (*GCDRequest) XXX_Merge

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

func (*GCDRequest) XXX_Size

func (m *GCDRequest) XXX_Size() int

func (*GCDRequest) XXX_Unmarshal

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

type GCDResponse

type GCDResponse struct {
	Result               uint64   `protobuf:"varint,1,opt,name=result,proto3" json:"result,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*GCDResponse) Descriptor

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

func (*GCDResponse) GetResult

func (m *GCDResponse) GetResult() uint64

func (*GCDResponse) ProtoMessage

func (*GCDResponse) ProtoMessage()

func (*GCDResponse) Reset

func (m *GCDResponse) Reset()

func (*GCDResponse) String

func (m *GCDResponse) String() string

func (*GCDResponse) XXX_DiscardUnknown

func (m *GCDResponse) XXX_DiscardUnknown()

func (*GCDResponse) XXX_Marshal

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

func (*GCDResponse) XXX_Merge

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

func (*GCDResponse) XXX_Size

func (m *GCDResponse) XXX_Size() int

func (*GCDResponse) XXX_Unmarshal

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

type GCDServiceClient

type GCDServiceClient interface {
	Compute(ctx context.Context, in *GCDRequest, opts ...grpc.CallOption) (*GCDResponse, error)
}

GCDServiceClient is the client API for GCDService service.

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

func NewGCDServiceClient

func NewGCDServiceClient(cc *grpc.ClientConn) GCDServiceClient

type GCDServiceServer

type GCDServiceServer interface {
	Compute(context.Context, *GCDRequest) (*GCDResponse, error)
}

GCDServiceServer is the server API for GCDService service.

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"`
	Details              map[string]*any.Any `` /* 155-byte string literal not displayed */
	Price                float64             `protobuf:"fixed64,5,opt,name=price,proto3" json:"price,omitempty"`
	Quantity             int32               `protobuf:"varint,6,opt,name=quantity,proto3" json:"quantity,omitempty"`
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func (*Product) Descriptor

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

func (*Product) GetDescription

func (m *Product) GetDescription() string

func (*Product) GetDetails

func (m *Product) GetDetails() map[string]*any.Any

func (*Product) GetId

func (m *Product) GetId() string

func (*Product) GetName

func (m *Product) GetName() string

func (*Product) GetPrice

func (m *Product) GetPrice() float64

func (*Product) GetQuantity

func (m *Product) GetQuantity() int32

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 ProductId

type ProductId 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 (*ProductId) Descriptor

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

func (*ProductId) GetId

func (m *ProductId) GetId() string

func (*ProductId) ProtoMessage

func (*ProductId) ProtoMessage()

func (*ProductId) Reset

func (m *ProductId) Reset()

func (*ProductId) String

func (m *ProductId) String() string

func (*ProductId) XXX_DiscardUnknown

func (m *ProductId) XXX_DiscardUnknown()

func (*ProductId) XXX_Marshal

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

func (*ProductId) XXX_Merge

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

func (*ProductId) XXX_Size

func (m *ProductId) XXX_Size() int

func (*ProductId) XXX_Unmarshal

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

type ProductServiceClient

type ProductServiceClient interface {
	Create(ctx context.Context, in *Product, opts ...grpc.CallOption) (*Product, error)
	FindOne(ctx context.Context, in *ProductId, opts ...grpc.CallOption) (*Product, error)
	FindAll(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (ProductService_FindAllClient, error)
	Update(ctx context.Context, in *Product, opts ...grpc.CallOption) (*Product, error)
	Delete(ctx context.Context, in *ProductId, opts ...grpc.CallOption) (*empty.Empty, error)
	Validate(ctx context.Context, in *ValidateQuantity, opts ...grpc.CallOption) (*empty.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.ClientConn) ProductServiceClient

type ProductServiceServer

type ProductServiceServer interface {
	Create(context.Context, *Product) (*Product, error)
	FindOne(context.Context, *ProductId) (*Product, error)
	FindAll(*empty.Empty, ProductService_FindAllServer) error
	Update(context.Context, *Product) (*Product, error)
	Delete(context.Context, *ProductId) (*empty.Empty, error)
	Validate(context.Context, *ValidateQuantity) (*empty.Empty, error)
}

ProductServiceServer is the server API for ProductService service.

type ProductService_FindAllClient

type ProductService_FindAllClient interface {
	Recv() (*Product, error)
	grpc.ClientStream
}

type ProductService_FindAllServer

type ProductService_FindAllServer interface {
	Send(*Product) error
	grpc.ServerStream
}

type UnimplementedCartServiceServer

type UnimplementedCartServiceServer struct {
}

UnimplementedCartServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedCartServiceServer) AddToCart

func (*UnimplementedCartServiceServer) Create

func (*UnimplementedCartServiceServer) Delete

func (*UnimplementedCartServiceServer) FindAll

func (*UnimplementedCartServiceServer) FindOne

func (*UnimplementedCartServiceServer) RemoveFromCart

func (*UnimplementedCartServiceServer) RemoveFromCart(ctx context.Context, req *CartQuantity) (*Cart, error)

func (*UnimplementedCartServiceServer) Update

type UnimplementedCheckoutServiceServer

type UnimplementedCheckoutServiceServer struct {
}

UnimplementedCheckoutServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedCheckoutServiceServer) Checkout

type UnimplementedGCDServiceServer

type UnimplementedGCDServiceServer struct {
}

UnimplementedGCDServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedGCDServiceServer) Compute

type UnimplementedProductServiceServer

type UnimplementedProductServiceServer struct {
}

UnimplementedProductServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedProductServiceServer) Create

func (*UnimplementedProductServiceServer) Delete

func (*UnimplementedProductServiceServer) FindAll

func (*UnimplementedProductServiceServer) FindOne

func (*UnimplementedProductServiceServer) Update

func (*UnimplementedProductServiceServer) Validate

type ValidateQuantity

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

func (*ValidateQuantity) Descriptor

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

func (*ValidateQuantity) GetId

func (m *ValidateQuantity) GetId() string

func (*ValidateQuantity) GetQuantity

func (m *ValidateQuantity) GetQuantity() int32

func (*ValidateQuantity) ProtoMessage

func (*ValidateQuantity) ProtoMessage()

func (*ValidateQuantity) Reset

func (m *ValidateQuantity) Reset()

func (*ValidateQuantity) String

func (m *ValidateQuantity) String() string

func (*ValidateQuantity) XXX_DiscardUnknown

func (m *ValidateQuantity) XXX_DiscardUnknown()

func (*ValidateQuantity) XXX_Marshal

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

func (*ValidateQuantity) XXX_Merge

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

func (*ValidateQuantity) XXX_Size

func (m *ValidateQuantity) XXX_Size() int

func (*ValidateQuantity) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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