service

package module
v0.0.0-...-0cb5878 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int64

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

func (x *Error) ProtoReflect() protoreflect.Message

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Id.ProtoReflect.Descriptor instead.

func (*Id) GetId

func (x *Id) GetId() int64

func (*Id) ProtoMessage

func (*Id) ProtoMessage()

func (*Id) ProtoReflect

func (x *Id) ProtoReflect() protoreflect.Message

func (*Id) Reset

func (x *Id) Reset()

func (*Id) String

func (x *Id) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Order.ProtoReflect.Descriptor instead.

func (*Order) GetId

func (x *Order) GetId() int64

func (*Order) GetProductid

func (x *Order) GetProductid() int64

func (*Order) GetQuantity

func (x *Order) GetQuantity() int64

func (*Order) GetTotalprice

func (x *Order) GetTotalprice() int64

func (*Order) GetUserid

func (x *Order) GetUserid() int64

func (*Order) GetUserpassword

func (x *Order) GetUserpassword() string

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) ProtoReflect

func (x *Order) ProtoReflect() protoreflect.Message

func (*Order) Reset

func (x *Order) Reset()

func (*Order) String

func (x *Order) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Orders.ProtoReflect.Descriptor instead.

func (*Orders) GetOrder

func (x *Orders) GetOrder() []*Order

func (*Orders) ProtoMessage

func (*Orders) ProtoMessage()

func (*Orders) ProtoReflect

func (x *Orders) ProtoReflect() protoreflect.Message

func (*Orders) Reset

func (x *Orders) Reset()

func (*Orders) String

func (x *Orders) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Product.ProtoReflect.Descriptor instead.

func (*Product) GetDescription

func (x *Product) GetDescription() string

func (*Product) GetId

func (x *Product) GetId() int64

func (*Product) GetName

func (x *Product) GetName() string

func (*Product) GetPrice

func (x *Product) GetPrice() int64

func (*Product) ProtoMessage

func (*Product) ProtoMessage()

func (*Product) ProtoReflect

func (x *Product) ProtoReflect() protoreflect.Message

func (*Product) Reset

func (x *Product) Reset()

func (*Product) String

func (x *Product) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Products.ProtoReflect.Descriptor instead.

func (*Products) GetProduct

func (x *Products) GetProduct() []*Product

func (*Products) ProtoMessage

func (*Products) ProtoMessage()

func (*Products) ProtoReflect

func (x *Products) ProtoReflect() protoreflect.Message

func (*Products) Reset

func (x *Products) Reset()

func (*Products) String

func (x *Products) String() string

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

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) AddProduct

func (*UnimplementedServiceServer) AddUser

func (*UnimplementedServiceServer) AllOrder

func (*UnimplementedServiceServer) AllProduct

func (*UnimplementedServiceServer) AllUser

func (*UnimplementedServiceServer) DeleteOrder

func (*UnimplementedServiceServer) DeleteProduct

func (*UnimplementedServiceServer) DeleteUser

func (*UnimplementedServiceServer) OneOrder

func (*UnimplementedServiceServer) OneProduct

func (*UnimplementedServiceServer) OneUser

func (*UnimplementedServiceServer) Tes

func (*UnimplementedServiceServer) UpdateOrder

func (*UnimplementedServiceServer) UpdateProduct

func (*UnimplementedServiceServer) UpdateUser

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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() int64

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetRole

func (x *User) GetRole() string

func (*User) GetUname

func (x *User) GetUname() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Users.ProtoReflect.Descriptor instead.

func (*Users) GetUser

func (x *Users) GetUser() []*User

func (*Users) ProtoMessage

func (*Users) ProtoMessage()

func (*Users) ProtoReflect

func (x *Users) ProtoReflect() protoreflect.Message

func (*Users) Reset

func (x *Users) Reset()

func (*Users) String

func (x *Users) String() string

Jump to

Keyboard shortcuts

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