Documentation ¶
Index ¶
- Variables
- func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
- type AddOrderStatus
- func (*AddOrderStatus) Descriptor() ([]byte, []int)deprecated
- func (x *AddOrderStatus) GetError() *Error
- func (x *AddOrderStatus) GetOrder() *Order
- func (x *AddOrderStatus) GetResponse() string
- func (*AddOrderStatus) ProtoMessage()
- func (x *AddOrderStatus) ProtoReflect() protoreflect.Message
- func (x *AddOrderStatus) Reset()
- func (x *AddOrderStatus) String() string
- type AddProductStatus
- func (*AddProductStatus) Descriptor() ([]byte, []int)deprecated
- func (x *AddProductStatus) GetAdminProduct() *AdminProduct
- func (x *AddProductStatus) GetError() *Error
- func (x *AddProductStatus) GetResponse() string
- func (*AddProductStatus) ProtoMessage()
- func (x *AddProductStatus) ProtoReflect() protoreflect.Message
- func (x *AddProductStatus) Reset()
- func (x *AddProductStatus) String() string
- type AddUserStatus
- func (*AddUserStatus) Descriptor() ([]byte, []int)deprecated
- func (x *AddUserStatus) GetError() *Error
- func (x *AddUserStatus) GetResponse() string
- func (x *AddUserStatus) GetUser() *User
- func (*AddUserStatus) ProtoMessage()
- func (x *AddUserStatus) ProtoReflect() protoreflect.Message
- func (x *AddUserStatus) Reset()
- func (x *AddUserStatus) String() string
- type AdminProduct
- func (*AdminProduct) Descriptor() ([]byte, []int)deprecated
- func (x *AdminProduct) GetAdminid() int64
- func (x *AdminProduct) GetAdminpass() string
- func (x *AdminProduct) GetDescription() string
- func (x *AdminProduct) GetId() int64
- func (x *AdminProduct) GetName() string
- func (x *AdminProduct) GetPrice() int64
- func (*AdminProduct) ProtoMessage()
- func (x *AdminProduct) ProtoReflect() protoreflect.Message
- func (x *AdminProduct) Reset()
- func (x *AdminProduct) String() string
- type EmptyStruct
- type Error
- type Id
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetId() int64
- func (x *Order) GetProductid() int64
- func (x *Order) GetQuantity() int64
- func (x *Order) GetTotalprice() int64
- func (x *Order) GetUserid() int64
- func (x *Order) GetUserpassword() string
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type Orders
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetDescription() string
- func (x *Product) GetId() int64
- func (x *Product) GetName() string
- func (x *Product) GetPrice() int64
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type Products
- type ResponseStatus
- func (*ResponseStatus) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseStatus) GetError() *Error
- func (x *ResponseStatus) GetResponse() string
- func (*ResponseStatus) ProtoMessage()
- func (x *ResponseStatus) ProtoReflect() protoreflect.Message
- func (x *ResponseStatus) Reset()
- func (x *ResponseStatus) String() string
- type ServiceClient
- type ServiceServer
- type UnimplementedServiceServer
- func (*UnimplementedServiceServer) AddOrder(context.Context, *Order) (*AddOrderStatus, error)
- func (*UnimplementedServiceServer) AddProduct(context.Context, *AdminProduct) (*AddProductStatus, error)
- func (*UnimplementedServiceServer) AddUser(context.Context, *User) (*AddUserStatus, error)
- func (*UnimplementedServiceServer) AllOrder(context.Context, *User) (*Orders, error)
- func (*UnimplementedServiceServer) AllProduct(context.Context, *EmptyStruct) (*Products, error)
- func (*UnimplementedServiceServer) AllUser(context.Context, *EmptyStruct) (*Users, error)
- func (*UnimplementedServiceServer) DeleteOrder(context.Context, *Order) (*ResponseStatus, error)
- func (*UnimplementedServiceServer) DeleteProduct(context.Context, *AdminProduct) (*ResponseStatus, error)
- func (*UnimplementedServiceServer) DeleteUser(context.Context, *User) (*ResponseStatus, error)
- func (*UnimplementedServiceServer) OneOrder(context.Context, *Order) (*Order, error)
- func (*UnimplementedServiceServer) OneProduct(context.Context, *Id) (*Product, error)
- func (*UnimplementedServiceServer) OneUser(context.Context, *Id) (*User, error)
- func (*UnimplementedServiceServer) Tes(context.Context, *EmptyStruct) (*ResponseStatus, error)
- func (*UnimplementedServiceServer) UpdateOrder(context.Context, *Order) (*ResponseStatus, error)
- func (*UnimplementedServiceServer) UpdateProduct(context.Context, *AdminProduct) (*ResponseStatus, error)
- func (*UnimplementedServiceServer) UpdateUser(context.Context, *User) (*ResponseStatus, error)
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetEmail() string
- func (x *User) GetId() int64
- func (x *User) GetPassword() string
- func (x *User) GetRole() string
- func (x *User) GetUname() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type Users
Constants ¶
This section is empty.
Variables ¶
var File_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterServiceServer ¶
func RegisterServiceServer(s *grpc.Server, srv ServiceServer)
Types ¶
type AddOrderStatus ¶
type AddOrderStatus struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` Order *Order `protobuf:"bytes,2,opt,name=Order,proto3" json:"Order,omitempty"` Error *Error `protobuf:"bytes,3,opt,name=error,proto3,oneof" json:"error,omitempty"` // contains filtered or unexported fields }
func (*AddOrderStatus) Descriptor
deprecated
func (*AddOrderStatus) Descriptor() ([]byte, []int)
Deprecated: Use AddOrderStatus.ProtoReflect.Descriptor instead.
func (*AddOrderStatus) GetError ¶
func (x *AddOrderStatus) GetError() *Error
func (*AddOrderStatus) GetOrder ¶
func (x *AddOrderStatus) GetOrder() *Order
func (*AddOrderStatus) GetResponse ¶
func (x *AddOrderStatus) GetResponse() string
func (*AddOrderStatus) ProtoMessage ¶
func (*AddOrderStatus) ProtoMessage()
func (*AddOrderStatus) ProtoReflect ¶
func (x *AddOrderStatus) ProtoReflect() protoreflect.Message
func (*AddOrderStatus) Reset ¶
func (x *AddOrderStatus) Reset()
func (*AddOrderStatus) String ¶
func (x *AddOrderStatus) String() string
type AddProductStatus ¶
type AddProductStatus struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` AdminProduct *AdminProduct `protobuf:"bytes,2,opt,name=AdminProduct,proto3" json:"AdminProduct,omitempty"` Error *Error `protobuf:"bytes,3,opt,name=error,proto3,oneof" json:"error,omitempty"` // contains filtered or unexported fields }
func (*AddProductStatus) Descriptor
deprecated
func (*AddProductStatus) Descriptor() ([]byte, []int)
Deprecated: Use AddProductStatus.ProtoReflect.Descriptor instead.
func (*AddProductStatus) GetAdminProduct ¶
func (x *AddProductStatus) GetAdminProduct() *AdminProduct
func (*AddProductStatus) GetError ¶
func (x *AddProductStatus) GetError() *Error
func (*AddProductStatus) GetResponse ¶
func (x *AddProductStatus) GetResponse() string
func (*AddProductStatus) ProtoMessage ¶
func (*AddProductStatus) ProtoMessage()
func (*AddProductStatus) ProtoReflect ¶
func (x *AddProductStatus) ProtoReflect() protoreflect.Message
func (*AddProductStatus) Reset ¶
func (x *AddProductStatus) Reset()
func (*AddProductStatus) String ¶
func (x *AddProductStatus) String() string
type AddUserStatus ¶
type AddUserStatus struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` User *User `protobuf:"bytes,2,opt,name=User,proto3" json:"User,omitempty"` Error *Error `protobuf:"bytes,3,opt,name=error,proto3,oneof" json:"error,omitempty"` // contains filtered or unexported fields }
func (*AddUserStatus) Descriptor
deprecated
func (*AddUserStatus) Descriptor() ([]byte, []int)
Deprecated: Use AddUserStatus.ProtoReflect.Descriptor instead.
func (*AddUserStatus) GetError ¶
func (x *AddUserStatus) GetError() *Error
func (*AddUserStatus) GetResponse ¶
func (x *AddUserStatus) GetResponse() string
func (*AddUserStatus) GetUser ¶
func (x *AddUserStatus) GetUser() *User
func (*AddUserStatus) ProtoMessage ¶
func (*AddUserStatus) ProtoMessage()
func (*AddUserStatus) ProtoReflect ¶
func (x *AddUserStatus) ProtoReflect() protoreflect.Message
func (*AddUserStatus) Reset ¶
func (x *AddUserStatus) Reset()
func (*AddUserStatus) String ¶
func (x *AddUserStatus) String() string
type AdminProduct ¶
type AdminProduct struct { Id int64 `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 int64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` Adminid int64 `protobuf:"varint,5,opt,name=adminid,proto3" json:"adminid,omitempty"` Adminpass string `protobuf:"bytes,6,opt,name=adminpass,proto3" json:"adminpass,omitempty"` // contains filtered or unexported fields }
func (*AdminProduct) Descriptor
deprecated
func (*AdminProduct) Descriptor() ([]byte, []int)
Deprecated: Use AdminProduct.ProtoReflect.Descriptor instead.
func (*AdminProduct) GetAdminid ¶
func (x *AdminProduct) GetAdminid() int64
func (*AdminProduct) GetAdminpass ¶
func (x *AdminProduct) GetAdminpass() string
func (*AdminProduct) GetDescription ¶
func (x *AdminProduct) GetDescription() string
func (*AdminProduct) GetId ¶
func (x *AdminProduct) GetId() int64
func (*AdminProduct) GetName ¶
func (x *AdminProduct) GetName() string
func (*AdminProduct) GetPrice ¶
func (x *AdminProduct) GetPrice() int64
func (*AdminProduct) ProtoMessage ¶
func (*AdminProduct) ProtoMessage()
func (*AdminProduct) ProtoReflect ¶
func (x *AdminProduct) ProtoReflect() protoreflect.Message
func (*AdminProduct) Reset ¶
func (x *AdminProduct) Reset()
func (*AdminProduct) String ¶
func (x *AdminProduct) String() string
type EmptyStruct ¶
type EmptyStruct struct {
// contains filtered or unexported fields
}
func (*EmptyStruct) Descriptor
deprecated
func (*EmptyStruct) Descriptor() ([]byte, []int)
Deprecated: Use EmptyStruct.ProtoReflect.Descriptor instead.
func (*EmptyStruct) ProtoMessage ¶
func (*EmptyStruct) ProtoMessage()
func (*EmptyStruct) ProtoReflect ¶
func (x *EmptyStruct) ProtoReflect() protoreflect.Message
func (*EmptyStruct) Reset ¶
func (x *EmptyStruct) Reset()
func (*EmptyStruct) String ¶
func (x *EmptyStruct) String() string
type Error ¶
type Error struct { Code *int64 `protobuf:"varint,1,opt,name=code,proto3,oneof" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type Id ¶
type Id struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*Id) Descriptor
deprecated
func (*Id) ProtoMessage ¶
func (*Id) ProtoMessage()
func (*Id) ProtoReflect ¶
func (x *Id) ProtoReflect() protoreflect.Message
type Order ¶
type Order struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Userid int64 `protobuf:"varint,2,opt,name=userid,proto3" json:"userid,omitempty"` Userpassword *string `protobuf:"bytes,3,opt,name=userpassword,proto3,oneof" json:"userpassword,omitempty"` Productid int64 `protobuf:"varint,4,opt,name=productid,proto3" json:"productid,omitempty"` Quantity int64 `protobuf:"varint,5,opt,name=quantity,proto3" json:"quantity,omitempty"` Totalprice int64 `protobuf:"varint,6,opt,name=totalprice,proto3" json:"totalprice,omitempty"` // contains filtered or unexported fields }
ORDER
func (*Order) Descriptor
deprecated
func (*Order) GetProductid ¶
func (*Order) GetQuantity ¶
func (*Order) GetTotalprice ¶
func (*Order) GetUserpassword ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type Orders ¶
type Orders struct { Order []*Order `protobuf:"bytes,1,rep,name=Order,proto3" json:"Order,omitempty"` // contains filtered or unexported fields }
func (*Orders) Descriptor
deprecated
func (*Orders) ProtoMessage ¶
func (*Orders) ProtoMessage()
func (*Orders) ProtoReflect ¶
func (x *Orders) ProtoReflect() protoreflect.Message
type Product ¶
type Product struct { Id int64 `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 int64 `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"` // contains filtered or unexported fields }
PRODUCT
func (*Product) Descriptor
deprecated
func (*Product) GetDescription ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type Products ¶
type Products struct { Product []*Product `protobuf:"bytes,1,rep,name=Product,proto3" json:"Product,omitempty"` // contains filtered or unexported fields }
func (*Products) Descriptor
deprecated
func (*Products) GetProduct ¶
func (*Products) ProtoMessage ¶
func (*Products) ProtoMessage()
func (*Products) ProtoReflect ¶
func (x *Products) ProtoReflect() protoreflect.Message
type ResponseStatus ¶
type ResponseStatus struct { Response string `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"` Error *Error `protobuf:"bytes,2,opt,name=error,proto3,oneof" json:"error,omitempty"` // contains filtered or unexported fields }
func (*ResponseStatus) Descriptor
deprecated
func (*ResponseStatus) Descriptor() ([]byte, []int)
Deprecated: Use ResponseStatus.ProtoReflect.Descriptor instead.
func (*ResponseStatus) GetError ¶
func (x *ResponseStatus) GetError() *Error
func (*ResponseStatus) GetResponse ¶
func (x *ResponseStatus) GetResponse() string
func (*ResponseStatus) ProtoMessage ¶
func (*ResponseStatus) ProtoMessage()
func (*ResponseStatus) ProtoReflect ¶
func (x *ResponseStatus) ProtoReflect() protoreflect.Message
func (*ResponseStatus) Reset ¶
func (x *ResponseStatus) Reset()
func (*ResponseStatus) String ¶
func (x *ResponseStatus) String() string
type ServiceClient ¶
type ServiceClient interface { AllUser(ctx context.Context, in *EmptyStruct, opts ...grpc.CallOption) (*Users, error) OneUser(ctx context.Context, in *Id, opts ...grpc.CallOption) (*User, error) AddUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*AddUserStatus, error) UpdateUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*ResponseStatus, error) DeleteUser(ctx context.Context, in *User, opts ...grpc.CallOption) (*ResponseStatus, error) AllOrder(ctx context.Context, in *User, opts ...grpc.CallOption) (*Orders, error) OneOrder(ctx context.Context, in *Order, opts ...grpc.CallOption) (*Order, error) AddOrder(ctx context.Context, in *Order, opts ...grpc.CallOption) (*AddOrderStatus, error) UpdateOrder(ctx context.Context, in *Order, opts ...grpc.CallOption) (*ResponseStatus, error) DeleteOrder(ctx context.Context, in *Order, opts ...grpc.CallOption) (*ResponseStatus, error) AllProduct(ctx context.Context, in *EmptyStruct, opts ...grpc.CallOption) (*Products, error) OneProduct(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Product, error) AddProduct(ctx context.Context, in *AdminProduct, opts ...grpc.CallOption) (*AddProductStatus, error) UpdateProduct(ctx context.Context, in *AdminProduct, opts ...grpc.CallOption) (*ResponseStatus, error) DeleteProduct(ctx context.Context, in *AdminProduct, opts ...grpc.CallOption) (*ResponseStatus, error) Tes(ctx context.Context, in *EmptyStruct, opts ...grpc.CallOption) (*ResponseStatus, error) }
ServiceClient is the client API for Service service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewServiceClient ¶
func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient
type ServiceServer ¶
type ServiceServer interface { AllUser(context.Context, *EmptyStruct) (*Users, error) OneUser(context.Context, *Id) (*User, error) AddUser(context.Context, *User) (*AddUserStatus, error) UpdateUser(context.Context, *User) (*ResponseStatus, error) DeleteUser(context.Context, *User) (*ResponseStatus, error) AllOrder(context.Context, *User) (*Orders, error) OneOrder(context.Context, *Order) (*Order, error) AddOrder(context.Context, *Order) (*AddOrderStatus, error) UpdateOrder(context.Context, *Order) (*ResponseStatus, error) DeleteOrder(context.Context, *Order) (*ResponseStatus, error) AllProduct(context.Context, *EmptyStruct) (*Products, error) OneProduct(context.Context, *Id) (*Product, error) AddProduct(context.Context, *AdminProduct) (*AddProductStatus, error) UpdateProduct(context.Context, *AdminProduct) (*ResponseStatus, error) DeleteProduct(context.Context, *AdminProduct) (*ResponseStatus, error) Tes(context.Context, *EmptyStruct) (*ResponseStatus, error) }
ServiceServer is the server API for Service service.
type UnimplementedServiceServer ¶
type UnimplementedServiceServer struct { }
UnimplementedServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedServiceServer) AddOrder ¶
func (*UnimplementedServiceServer) AddOrder(context.Context, *Order) (*AddOrderStatus, error)
func (*UnimplementedServiceServer) AddProduct ¶
func (*UnimplementedServiceServer) AddProduct(context.Context, *AdminProduct) (*AddProductStatus, error)
func (*UnimplementedServiceServer) AddUser ¶
func (*UnimplementedServiceServer) AddUser(context.Context, *User) (*AddUserStatus, error)
func (*UnimplementedServiceServer) AllProduct ¶
func (*UnimplementedServiceServer) AllProduct(context.Context, *EmptyStruct) (*Products, error)
func (*UnimplementedServiceServer) AllUser ¶
func (*UnimplementedServiceServer) AllUser(context.Context, *EmptyStruct) (*Users, error)
func (*UnimplementedServiceServer) DeleteOrder ¶
func (*UnimplementedServiceServer) DeleteOrder(context.Context, *Order) (*ResponseStatus, error)
func (*UnimplementedServiceServer) DeleteProduct ¶
func (*UnimplementedServiceServer) DeleteProduct(context.Context, *AdminProduct) (*ResponseStatus, error)
func (*UnimplementedServiceServer) DeleteUser ¶
func (*UnimplementedServiceServer) DeleteUser(context.Context, *User) (*ResponseStatus, error)
func (*UnimplementedServiceServer) OneProduct ¶
func (*UnimplementedServiceServer) Tes ¶
func (*UnimplementedServiceServer) Tes(context.Context, *EmptyStruct) (*ResponseStatus, error)
func (*UnimplementedServiceServer) UpdateOrder ¶
func (*UnimplementedServiceServer) UpdateOrder(context.Context, *Order) (*ResponseStatus, error)
func (*UnimplementedServiceServer) UpdateProduct ¶
func (*UnimplementedServiceServer) UpdateProduct(context.Context, *AdminProduct) (*ResponseStatus, error)
func (*UnimplementedServiceServer) UpdateUser ¶
func (*UnimplementedServiceServer) UpdateUser(context.Context, *User) (*ResponseStatus, error)
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Uname string `protobuf:"bytes,2,opt,name=uname,proto3" json:"uname,omitempty"` Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"` Password *string `protobuf:"bytes,4,opt,name=password,proto3,oneof" json:"password,omitempty"` Role string `protobuf:"bytes,5,opt,name=role,proto3" json:"role,omitempty"` // contains filtered or unexported fields }
USER
func (*User) Descriptor
deprecated
func (*User) GetPassword ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type Users ¶
type Users struct { User []*User `protobuf:"bytes,1,rep,name=User,proto3" json:"User,omitempty"` // contains filtered or unexported fields }
func (*Users) Descriptor
deprecated
func (*Users) ProtoMessage ¶
func (*Users) ProtoMessage()
func (*Users) ProtoReflect ¶
func (x *Users) ProtoReflect() protoreflect.Message