proto

package
v0.0.0-...-91d05ba Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterProductServiceServer

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

Types

type Product

type Product struct {
	Id                   int32    `protobuf:"varint,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"`
	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) GetId

func (m *Product) GetId() int32

func (*Product) GetName

func (m *Product) GetName() string

func (*Product) GetPrice

func (m *Product) GetPrice() float32

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 ProductList

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

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

func (*ProductList) GetProducts

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

func (*ProductList) ProtoMessage

func (*ProductList) ProtoMessage()

func (*ProductList) Reset

func (m *ProductList) Reset()

func (*ProductList) String

func (m *ProductList) String() string

func (*ProductList) XXX_DiscardUnknown

func (m *ProductList) XXX_DiscardUnknown()

func (*ProductList) XXX_Marshal

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

func (*ProductList) XXX_Merge

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

func (*ProductList) XXX_Size

func (m *ProductList) XXX_Size() int

func (*ProductList) XXX_Unmarshal

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

type ProductQuery

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

func (*ProductQuery) Descriptor

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

func (*ProductQuery) GetId

func (m *ProductQuery) GetId() int32

func (*ProductQuery) ProtoMessage

func (*ProductQuery) ProtoMessage()

func (*ProductQuery) Reset

func (m *ProductQuery) Reset()

func (*ProductQuery) String

func (m *ProductQuery) String() string

func (*ProductQuery) XXX_DiscardUnknown

func (m *ProductQuery) XXX_DiscardUnknown()

func (*ProductQuery) XXX_Marshal

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

func (*ProductQuery) XXX_Merge

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

func (*ProductQuery) XXX_Size

func (m *ProductQuery) XXX_Size() int

func (*ProductQuery) XXX_Unmarshal

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

type ProductServiceClient

type ProductServiceClient interface {
	GetProducts(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ProductList, error)
	GetProduct(ctx context.Context, in *ProductQuery, opts ...grpc.CallOption) (*Product, error)
	AddProduct(ctx context.Context, in *Product, opts ...grpc.CallOption) (*empty.Empty, error)
	UpdateProduct(ctx context.Context, in *Product, 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 {
	GetProducts(context.Context, *empty.Empty) (*ProductList, error)
	GetProduct(context.Context, *ProductQuery) (*Product, error)
	AddProduct(context.Context, *Product) (*empty.Empty, error)
	UpdateProduct(context.Context, *Product) (*empty.Empty, error)
}

ProductServiceServer is the server API for ProductService service.

type UnimplementedProductServiceServer

type UnimplementedProductServiceServer struct {
}

UnimplementedProductServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedProductServiceServer) AddProduct

func (*UnimplementedProductServiceServer) GetProduct

func (*UnimplementedProductServiceServer) GetProducts

func (*UnimplementedProductServiceServer) UpdateProduct

Jump to

Keyboard shortcuts

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