Documentation ¶
Overview ¶
Package pbv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package pbv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package pbv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterOrderServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOrderServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrderServiceClient) error
- func RegisterOrderServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOrderServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrderServiceServer) error
- func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer)
- func RegisterProductServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProductServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProductServiceClient) error
- func RegisterProductServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProductServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProductServiceServer) error
- func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
- func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
- func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type AuthorizeRequest
- type ChangeProductRequest
- func (*ChangeProductRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ChangeProductRequest) GetParams() *ChangeProductRequestParams
- func (x *ChangeProductRequest) GetUserProductUuid() string
- func (x *ChangeProductRequest) GetUserUuid() string
- func (*ChangeProductRequest) ProtoMessage()
- func (x *ChangeProductRequest) ProtoReflect() protoreflect.Message
- func (x *ChangeProductRequest) Reset()
- func (x *ChangeProductRequest) String() string
- type ChangeProductRequestParams
- func (*ChangeProductRequestParams) Descriptor() ([]byte, []int)deprecated
- func (x *ChangeProductRequestParams) GetCount() uint32
- func (*ChangeProductRequestParams) ProtoMessage()
- func (x *ChangeProductRequestParams) ProtoReflect() protoreflect.Message
- func (x *ChangeProductRequestParams) Reset()
- func (x *ChangeProductRequestParams) String() string
- type CheckoutOrderRequest
- func (*CheckoutOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CheckoutOrderRequest) GetOrderUuid() string
- func (x *CheckoutOrderRequest) GetParams() *CheckoutOrderRequestParams
- func (*CheckoutOrderRequest) ProtoMessage()
- func (x *CheckoutOrderRequest) ProtoReflect() protoreflect.Message
- func (x *CheckoutOrderRequest) Reset()
- func (x *CheckoutOrderRequest) String() string
- type CheckoutOrderRequestParams
- func (*CheckoutOrderRequestParams) Descriptor() ([]byte, []int)deprecated
- func (x *CheckoutOrderRequestParams) GetAmount() float64
- func (x *CheckoutOrderRequestParams) GetStatus() OrderStatus
- func (*CheckoutOrderRequestParams) ProtoMessage()
- func (x *CheckoutOrderRequestParams) ProtoReflect() protoreflect.Message
- func (x *CheckoutOrderRequestParams) Reset()
- func (x *CheckoutOrderRequestParams) String() string
- type CreateOrderRequest
- func (*CreateOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderRequest) GetParams() *CreateOrderRequestParams
- func (x *CreateOrderRequest) GetUserUuid() string
- func (*CreateOrderRequest) ProtoMessage()
- func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message
- func (x *CreateOrderRequest) Reset()
- func (x *CreateOrderRequest) String() string
- type CreateOrderRequestParams
- func (*CreateOrderRequestParams) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderRequestParams) GetAddress() string
- func (x *CreateOrderRequestParams) GetDeliveredAt() *timestamppb.Timestamp
- func (x *CreateOrderRequestParams) GetProducts() []*UserProduct
- func (*CreateOrderRequestParams) ProtoMessage()
- func (x *CreateOrderRequestParams) ProtoReflect() protoreflect.Message
- func (x *CreateOrderRequestParams) Reset()
- func (x *CreateOrderRequestParams) String() string
- type Error
- func (*Error) Descriptor() ([]byte, []int)deprecated
- func (x *Error) GetCode() uint32
- func (x *Error) GetDetails() map[string]string
- func (x *Error) GetMessage() string
- func (*Error) ProtoMessage()
- func (x *Error) ProtoReflect() protoreflect.Message
- func (x *Error) Reset()
- func (x *Error) String() string
- type GetByProductUUIDRequest
- func (*GetByProductUUIDRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetByProductUUIDRequest) GetProductUuid() string
- func (*GetByProductUUIDRequest) ProtoMessage()
- func (x *GetByProductUUIDRequest) ProtoReflect() protoreflect.Message
- func (x *GetByProductUUIDRequest) Reset()
- func (x *GetByProductUUIDRequest) String() string
- type GetByUserUUIDRequest
- func (*GetByUserUUIDRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetByUserUUIDRequest) GetUserUuid() string
- func (*GetByUserUUIDRequest) ProtoMessage()
- func (x *GetByUserUUIDRequest) ProtoReflect() protoreflect.Message
- func (x *GetByUserUUIDRequest) Reset()
- func (x *GetByUserUUIDRequest) String() string
- type GetUserProductRequestParams
- func (*GetUserProductRequestParams) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserProductRequestParams) GetProductUuidIn() []string
- func (x *GetUserProductRequestParams) GetUserUuidIn() []string
- func (x *GetUserProductRequestParams) GetUuidIn() []string
- func (*GetUserProductRequestParams) ProtoMessage()
- func (x *GetUserProductRequestParams) ProtoReflect() protoreflect.Message
- func (x *GetUserProductRequestParams) Reset()
- func (x *GetUserProductRequestParams) String() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetAddress() string
- func (x *Order) GetAmount() float64
- func (x *Order) GetCreatedAt() *timestamppb.Timestamp
- func (x *Order) GetDeliveredAt() *timestamppb.Timestamp
- func (x *Order) GetProducts() []*UserProduct
- func (x *Order) GetStatus() OrderStatus
- func (x *Order) GetUserUuid() string
- func (x *Order) GetUuid() string
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderServiceClient
- type OrderServiceServer
- type OrderStatus
- func (OrderStatus) Descriptor() protoreflect.EnumDescriptor
- func (x OrderStatus) Enum() *OrderStatus
- func (OrderStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderStatus) Number() protoreflect.EnumNumber
- func (x OrderStatus) String() string
- func (OrderStatus) Type() protoreflect.EnumType
- type Paginator
- type Permission
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetAvailability() bool
- func (x *Product) GetCreatedAt() *timestamppb.Timestamp
- func (x *Product) GetName() string
- func (x *Product) GetPrice() float64
- func (x *Product) GetProperties() []*ProductProperty
- func (x *Product) GetStatus() ProductStatus
- func (x *Product) GetUuid() string
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- type ProductProperty
- func (*ProductProperty) Descriptor() ([]byte, []int)deprecated
- func (x *ProductProperty) GetName() string
- func (x *ProductProperty) GetValue() string
- func (*ProductProperty) ProtoMessage()
- func (x *ProductProperty) ProtoReflect() protoreflect.Message
- func (x *ProductProperty) Reset()
- func (x *ProductProperty) String() string
- type ProductResponse
- func (*ProductResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ProductResponse) GetCount() uint32
- func (x *ProductResponse) GetItems() []*Product
- func (*ProductResponse) ProtoMessage()
- func (x *ProductResponse) ProtoReflect() protoreflect.Message
- func (x *ProductResponse) Reset()
- func (x *ProductResponse) String() string
- type ProductServiceClient
- type ProductServiceServer
- type ProductStatus
- func (ProductStatus) Descriptor() protoreflect.EnumDescriptor
- func (x ProductStatus) Enum() *ProductStatus
- func (ProductStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x ProductStatus) Number() protoreflect.EnumNumber
- func (x ProductStatus) String() string
- func (ProductStatus) Type() protoreflect.EnumType
- type ProductsRequest
- func (*ProductsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProductsRequest) GetFilter() *ProductsRequestFilter
- func (x *ProductsRequest) GetPaginator() *Paginator
- func (*ProductsRequest) ProtoMessage()
- func (x *ProductsRequest) ProtoReflect() protoreflect.Message
- func (x *ProductsRequest) Reset()
- func (x *ProductsRequest) String() string
- type ProductsRequestFilter
- func (*ProductsRequestFilter) Descriptor() ([]byte, []int)deprecated
- func (x *ProductsRequestFilter) GetNameContains() string
- func (x *ProductsRequestFilter) GetPriceGt() float64
- func (x *ProductsRequestFilter) GetPriceLt() float64
- func (x *ProductsRequestFilter) GetPropertiesEq() []*ProductProperty
- func (x *ProductsRequestFilter) GetUuidIn() []string
- func (*ProductsRequestFilter) ProtoMessage()
- func (x *ProductsRequestFilter) ProtoReflect() protoreflect.Message
- func (x *ProductsRequestFilter) Reset()
- func (x *ProductsRequestFilter) String() string
- type PutProductRequest
- func (*PutProductRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PutProductRequest) GetParams() *PutProductRequestParams
- func (x *PutProductRequest) GetUserUuid() string
- func (*PutProductRequest) ProtoMessage()
- func (x *PutProductRequest) ProtoReflect() protoreflect.Message
- func (x *PutProductRequest) Reset()
- func (x *PutProductRequest) String() string
- type PutProductRequestParams
- func (*PutProductRequestParams) Descriptor() ([]byte, []int)deprecated
- func (x *PutProductRequestParams) GetProductCount() uint32
- func (x *PutProductRequestParams) GetProductUuid() string
- func (*PutProductRequestParams) ProtoMessage()
- func (x *PutProductRequestParams) ProtoReflect() protoreflect.Message
- func (x *PutProductRequestParams) Reset()
- func (x *PutProductRequestParams) String() string
- type RegisterRequest
- type Role
- type Session
- type TokenResponse
- type UnimplementedOrderServiceServer
- type UnimplementedProductServiceServer
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) Authorize(context.Context, *AuthorizeRequest) (*TokenResponse, error)
- func (UnimplementedUserServiceServer) ChangeProduct(context.Context, *ChangeProductRequest) (*UserProductsResponse, error)
- func (UnimplementedUserServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*Order, error)
- func (UnimplementedUserServiceServer) GetByUUID(context.Context, *GetByUserUUIDRequest) (*User, error)
- func (UnimplementedUserServiceServer) GetUserProducts(context.Context, *GetByUserUUIDRequest) (*UserProductsResponse, error)
- func (UnimplementedUserServiceServer) PutProduct(context.Context, *PutProductRequest) (*UserProductsResponse, error)
- func (UnimplementedUserServiceServer) Register(context.Context, *RegisterRequest) (*TokenResponse, error)
- type UnsafeOrderServiceServer
- type UnsafeProductServiceServer
- type UnsafeUserServiceServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetCreatedAt() *timestamppb.Timestamp
- func (x *User) GetFirstname() string
- func (x *User) GetGroup() UserGroup
- func (x *User) GetLastname() string
- func (x *User) GetPhoneNumber() string
- func (x *User) GetStatus() UserStatus
- func (x *User) GetUuid() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserGroup
- type UserProduct
- func (*UserProduct) Descriptor() ([]byte, []int)deprecated
- func (x *UserProduct) GetCount() uint32
- func (x *UserProduct) GetProductUuid() string
- func (x *UserProduct) GetUuid() string
- func (*UserProduct) ProtoMessage()
- func (x *UserProduct) ProtoReflect() protoreflect.Message
- func (x *UserProduct) Reset()
- func (x *UserProduct) String() string
- type UserProductsResponse
- func (*UserProductsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserProductsResponse) GetCount() uint32
- func (x *UserProductsResponse) GetProducts() []*UserProduct
- func (*UserProductsResponse) ProtoMessage()
- func (x *UserProductsResponse) ProtoReflect() protoreflect.Message
- func (x *UserProductsResponse) Reset()
- func (x *UserProductsResponse) String() string
- type UserServiceClient
- type UserServiceServer
- type UserStatus
Constants ¶
This section is empty.
Variables ¶
var ( OrderStatus_name = map[int32]string{ 0: "ORDER_STATUS_UNSPECIFIED", 1: "ORDER_STATUS_CREATED", 2: "ORDER_STATUS_PAID", 3: "ORDER_STATUS_DELIVERED", } OrderStatus_value = map[string]int32{ "ORDER_STATUS_UNSPECIFIED": 0, "ORDER_STATUS_CREATED": 1, "ORDER_STATUS_PAID": 2, "ORDER_STATUS_DELIVERED": 3, } )
Enum value maps for OrderStatus.
var ( ProductStatus_name = map[int32]string{ 0: "PRODUCT_STATUS_UNSPECIFIED", 1: "PRODUCT_STATUS_ACTIVE", 2: "PRODUCT_STATUS_ARCHIVED", } ProductStatus_value = map[string]int32{ "PRODUCT_STATUS_UNSPECIFIED": 0, "PRODUCT_STATUS_ACTIVE": 1, "PRODUCT_STATUS_ARCHIVED": 2, } )
Enum value maps for ProductStatus.
var ( UserGroup_name = map[int32]string{ 0: "USER_GROUP_GUEST", 1: "USER_GROUP_CUSTOMER", } UserGroup_value = map[string]int32{ "USER_GROUP_GUEST": 0, "USER_GROUP_CUSTOMER": 1, } )
Enum value maps for UserGroup.
var ( UserStatus_name = map[int32]string{ 0: "USER_STATUS_UNSPECIFIED", 1: "USER_STATUS_UNCONFIRMED", 2: "USER_STATUS_ACTIVE", 3: "USER_STATUS_BLOCKED", } UserStatus_value = map[string]int32{ "USER_STATUS_UNSPECIFIED": 0, "USER_STATUS_UNCONFIRMED": 1, "USER_STATUS_ACTIVE": 2, "USER_STATUS_BLOCKED": 3, } )
Enum value maps for UserStatus.
var ( Role_name = map[int32]string{ 0: "ROLE_UNSPECIFIED", 1: "ROLE_USER", 2: "ROLE_PRODUCT", 3: "ROLE_ORDER", 4: "ROLE_USER_PRODUCT", } Role_value = map[string]int32{ "ROLE_UNSPECIFIED": 0, "ROLE_USER": 1, "ROLE_PRODUCT": 2, "ROLE_ORDER": 3, "ROLE_USER_PRODUCT": 4, } )
Enum value maps for Role.
var ( Permission_name = map[int32]string{ 0: "PERMISSION_UNSPECIFIED", 1: "PERMISSION_READ", 2: "PERMISSION_WRITE", } Permission_value = map[string]int32{ "PERMISSION_UNSPECIFIED": 0, "PERMISSION_READ": 1, "PERMISSION_WRITE": 2, } )
Enum value maps for Permission.
var File_api_proto_v1_common_proto protoreflect.FileDescriptor
var File_api_proto_v1_header_proto protoreflect.FileDescriptor
var File_api_proto_v1_order_proto protoreflect.FileDescriptor
var File_api_proto_v1_order_service_proto protoreflect.FileDescriptor
var File_api_proto_v1_product_proto protoreflect.FileDescriptor
var File_api_proto_v1_product_service_proto protoreflect.FileDescriptor
var File_api_proto_v1_user_proto protoreflect.FileDescriptor
var File_api_proto_v1_user_service_proto protoreflect.FileDescriptor
var OrderService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.v1.OrderService", HandlerType: (*OrderServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Checkout", Handler: _OrderService_Checkout_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/proto/v1/order_service.proto", }
OrderService_ServiceDesc is the grpc.ServiceDesc for OrderService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var ProductService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.v1.ProductService", HandlerType: (*ProductServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetAllByFilter", Handler: _ProductService_GetAllByFilter_Handler, }, { MethodName: "GetByUUID", Handler: _ProductService_GetByUUID_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/proto/v1/product_service.proto", }
ProductService_ServiceDesc is the grpc.ServiceDesc for ProductService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pb.v1.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _UserService_Register_Handler, }, { MethodName: "Authorize", Handler: _UserService_Authorize_Handler, }, { MethodName: "GetByUUID", Handler: _UserService_GetByUUID_Handler, }, { MethodName: "GetUserProducts", Handler: _UserService_GetUserProducts_Handler, }, { MethodName: "PutProduct", Handler: _UserService_PutProduct_Handler, }, { MethodName: "ChangeProduct", Handler: _UserService_ChangeProduct_Handler, }, { MethodName: "CreateOrder", Handler: _UserService_CreateOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/proto/v1/user_service.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOrderServiceHandler ¶
func RegisterOrderServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOrderServiceHandler registers the http handlers for service OrderService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOrderServiceHandlerClient ¶
func RegisterOrderServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OrderServiceClient) error
RegisterOrderServiceHandlerClient registers the http handlers for service OrderService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OrderServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OrderServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OrderServiceClient" to call the correct interceptors.
func RegisterOrderServiceHandlerFromEndpoint ¶
func RegisterOrderServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOrderServiceHandlerFromEndpoint is same as RegisterOrderServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOrderServiceHandlerServer ¶
func RegisterOrderServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OrderServiceServer) error
RegisterOrderServiceHandlerServer registers the http handlers for service OrderService to "mux". UnaryRPC :call OrderServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterOrderServiceHandlerFromEndpoint instead.
func RegisterOrderServiceServer ¶
func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer)
func RegisterProductServiceHandler ¶
func RegisterProductServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterProductServiceHandler registers the http handlers for service ProductService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProductServiceHandlerClient ¶
func RegisterProductServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProductServiceClient) error
RegisterProductServiceHandlerClient registers the http handlers for service ProductService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProductServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProductServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProductServiceClient" to call the correct interceptors.
func RegisterProductServiceHandlerFromEndpoint ¶
func RegisterProductServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProductServiceHandlerFromEndpoint is same as RegisterProductServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProductServiceHandlerServer ¶
func RegisterProductServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProductServiceServer) error
RegisterProductServiceHandlerServer registers the http handlers for service ProductService to "mux". UnaryRPC :call ProductServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProductServiceHandlerFromEndpoint instead.
func RegisterProductServiceServer ¶
func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
func RegisterUserServiceHandler ¶
func RegisterUserServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterUserServiceHandler registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterUserServiceHandlerClient ¶
func RegisterUserServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UserServiceClient) error
RegisterUserServiceHandlerClient registers the http handlers for service UserService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UserServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UserServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "UserServiceClient" to call the correct interceptors.
func RegisterUserServiceHandlerFromEndpoint ¶
func RegisterUserServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterUserServiceHandlerFromEndpoint is same as RegisterUserServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterUserServiceHandlerServer ¶
func RegisterUserServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UserServiceServer) error
RegisterUserServiceHandlerServer registers the http handlers for service UserService to "mux". UnaryRPC :call UserServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUserServiceHandlerFromEndpoint instead.
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type AuthorizeRequest ¶
type AuthorizeRequest struct { PhoneNumber string `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // contains filtered or unexported fields }
func (*AuthorizeRequest) Descriptor
deprecated
func (*AuthorizeRequest) Descriptor() ([]byte, []int)
Deprecated: Use AuthorizeRequest.ProtoReflect.Descriptor instead.
func (*AuthorizeRequest) GetPhoneNumber ¶
func (x *AuthorizeRequest) GetPhoneNumber() string
func (*AuthorizeRequest) ProtoMessage ¶
func (*AuthorizeRequest) ProtoMessage()
func (*AuthorizeRequest) ProtoReflect ¶
func (x *AuthorizeRequest) ProtoReflect() protoreflect.Message
func (*AuthorizeRequest) Reset ¶
func (x *AuthorizeRequest) Reset()
func (*AuthorizeRequest) String ¶
func (x *AuthorizeRequest) String() string
type ChangeProductRequest ¶
type ChangeProductRequest struct { UserUuid string `protobuf:"bytes,1,opt,name=user_uuid,json=userUuid,proto3" json:"user_uuid,omitempty"` UserProductUuid string `protobuf:"bytes,2,opt,name=user_product_uuid,json=userProductUuid,proto3" json:"user_product_uuid,omitempty"` Params *ChangeProductRequestParams `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
func (*ChangeProductRequest) Descriptor
deprecated
func (*ChangeProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChangeProductRequest.ProtoReflect.Descriptor instead.
func (*ChangeProductRequest) GetParams ¶
func (x *ChangeProductRequest) GetParams() *ChangeProductRequestParams
func (*ChangeProductRequest) GetUserProductUuid ¶
func (x *ChangeProductRequest) GetUserProductUuid() string
func (*ChangeProductRequest) GetUserUuid ¶
func (x *ChangeProductRequest) GetUserUuid() string
func (*ChangeProductRequest) ProtoMessage ¶
func (*ChangeProductRequest) ProtoMessage()
func (*ChangeProductRequest) ProtoReflect ¶
func (x *ChangeProductRequest) ProtoReflect() protoreflect.Message
func (*ChangeProductRequest) Reset ¶
func (x *ChangeProductRequest) Reset()
func (*ChangeProductRequest) String ¶
func (x *ChangeProductRequest) String() string
type ChangeProductRequestParams ¶
type ChangeProductRequestParams struct { Count uint32 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*ChangeProductRequestParams) Descriptor
deprecated
func (*ChangeProductRequestParams) Descriptor() ([]byte, []int)
Deprecated: Use ChangeProductRequestParams.ProtoReflect.Descriptor instead.
func (*ChangeProductRequestParams) GetCount ¶
func (x *ChangeProductRequestParams) GetCount() uint32
func (*ChangeProductRequestParams) ProtoMessage ¶
func (*ChangeProductRequestParams) ProtoMessage()
func (*ChangeProductRequestParams) ProtoReflect ¶
func (x *ChangeProductRequestParams) ProtoReflect() protoreflect.Message
func (*ChangeProductRequestParams) Reset ¶
func (x *ChangeProductRequestParams) Reset()
func (*ChangeProductRequestParams) String ¶
func (x *ChangeProductRequestParams) String() string
type CheckoutOrderRequest ¶
type CheckoutOrderRequest struct { OrderUuid string `protobuf:"bytes,1,opt,name=order_uuid,json=orderUuid,proto3" json:"order_uuid,omitempty"` Params *CheckoutOrderRequestParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
func (*CheckoutOrderRequest) Descriptor
deprecated
func (*CheckoutOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckoutOrderRequest.ProtoReflect.Descriptor instead.
func (*CheckoutOrderRequest) GetOrderUuid ¶
func (x *CheckoutOrderRequest) GetOrderUuid() string
func (*CheckoutOrderRequest) GetParams ¶
func (x *CheckoutOrderRequest) GetParams() *CheckoutOrderRequestParams
func (*CheckoutOrderRequest) ProtoMessage ¶
func (*CheckoutOrderRequest) ProtoMessage()
func (*CheckoutOrderRequest) ProtoReflect ¶
func (x *CheckoutOrderRequest) ProtoReflect() protoreflect.Message
func (*CheckoutOrderRequest) Reset ¶
func (x *CheckoutOrderRequest) Reset()
func (*CheckoutOrderRequest) String ¶
func (x *CheckoutOrderRequest) String() string
type CheckoutOrderRequestParams ¶
type CheckoutOrderRequestParams struct { Amount float64 `protobuf:"fixed64,1,opt,name=amount,proto3" json:"amount,omitempty"` Status OrderStatus `protobuf:"varint,2,opt,name=status,proto3,enum=pb.v1.OrderStatus" json:"status,omitempty"` // contains filtered or unexported fields }
func (*CheckoutOrderRequestParams) Descriptor
deprecated
func (*CheckoutOrderRequestParams) Descriptor() ([]byte, []int)
Deprecated: Use CheckoutOrderRequestParams.ProtoReflect.Descriptor instead.
func (*CheckoutOrderRequestParams) GetAmount ¶
func (x *CheckoutOrderRequestParams) GetAmount() float64
func (*CheckoutOrderRequestParams) GetStatus ¶
func (x *CheckoutOrderRequestParams) GetStatus() OrderStatus
func (*CheckoutOrderRequestParams) ProtoMessage ¶
func (*CheckoutOrderRequestParams) ProtoMessage()
func (*CheckoutOrderRequestParams) ProtoReflect ¶
func (x *CheckoutOrderRequestParams) ProtoReflect() protoreflect.Message
func (*CheckoutOrderRequestParams) Reset ¶
func (x *CheckoutOrderRequestParams) Reset()
func (*CheckoutOrderRequestParams) String ¶
func (x *CheckoutOrderRequestParams) String() string
type CreateOrderRequest ¶
type CreateOrderRequest struct { UserUuid string `protobuf:"bytes,1,opt,name=user_uuid,json=userUuid,proto3" json:"user_uuid,omitempty"` Params *CreateOrderRequestParams `protobuf:"bytes,3,opt,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderRequest) Descriptor
deprecated
func (*CreateOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.
func (*CreateOrderRequest) GetParams ¶
func (x *CreateOrderRequest) GetParams() *CreateOrderRequestParams
func (*CreateOrderRequest) GetUserUuid ¶
func (x *CreateOrderRequest) GetUserUuid() string
func (*CreateOrderRequest) ProtoMessage ¶
func (*CreateOrderRequest) ProtoMessage()
func (*CreateOrderRequest) ProtoReflect ¶
func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message
func (*CreateOrderRequest) Reset ¶
func (x *CreateOrderRequest) Reset()
func (*CreateOrderRequest) String ¶
func (x *CreateOrderRequest) String() string
type CreateOrderRequestParams ¶
type CreateOrderRequestParams struct { Products []*UserProduct `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` DeliveredAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=delivered_at,json=deliveredAt,proto3" json:"delivered_at,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderRequestParams) Descriptor
deprecated
func (*CreateOrderRequestParams) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderRequestParams.ProtoReflect.Descriptor instead.
func (*CreateOrderRequestParams) GetAddress ¶
func (x *CreateOrderRequestParams) GetAddress() string
func (*CreateOrderRequestParams) GetDeliveredAt ¶
func (x *CreateOrderRequestParams) GetDeliveredAt() *timestamppb.Timestamp
func (*CreateOrderRequestParams) GetProducts ¶
func (x *CreateOrderRequestParams) GetProducts() []*UserProduct
func (*CreateOrderRequestParams) ProtoMessage ¶
func (*CreateOrderRequestParams) ProtoMessage()
func (*CreateOrderRequestParams) ProtoReflect ¶
func (x *CreateOrderRequestParams) ProtoReflect() protoreflect.Message
func (*CreateOrderRequestParams) Reset ¶
func (x *CreateOrderRequestParams) Reset()
func (*CreateOrderRequestParams) String ¶
func (x *CreateOrderRequestParams) String() string
type Error ¶
type Error struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Details map[string]string `` /* 155-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetDetails ¶
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type GetByProductUUIDRequest ¶
type GetByProductUUIDRequest struct { ProductUuid string `protobuf:"bytes,1,opt,name=product_uuid,json=productUuid,proto3" json:"product_uuid,omitempty"` // contains filtered or unexported fields }
func (*GetByProductUUIDRequest) Descriptor
deprecated
func (*GetByProductUUIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetByProductUUIDRequest.ProtoReflect.Descriptor instead.
func (*GetByProductUUIDRequest) GetProductUuid ¶
func (x *GetByProductUUIDRequest) GetProductUuid() string
func (*GetByProductUUIDRequest) ProtoMessage ¶
func (*GetByProductUUIDRequest) ProtoMessage()
func (*GetByProductUUIDRequest) ProtoReflect ¶
func (x *GetByProductUUIDRequest) ProtoReflect() protoreflect.Message
func (*GetByProductUUIDRequest) Reset ¶
func (x *GetByProductUUIDRequest) Reset()
func (*GetByProductUUIDRequest) String ¶
func (x *GetByProductUUIDRequest) String() string
type GetByUserUUIDRequest ¶
type GetByUserUUIDRequest struct { UserUuid string `protobuf:"bytes,1,opt,name=user_uuid,json=userUuid,proto3" json:"user_uuid,omitempty"` // contains filtered or unexported fields }
func (*GetByUserUUIDRequest) Descriptor
deprecated
func (*GetByUserUUIDRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetByUserUUIDRequest.ProtoReflect.Descriptor instead.
func (*GetByUserUUIDRequest) GetUserUuid ¶
func (x *GetByUserUUIDRequest) GetUserUuid() string
func (*GetByUserUUIDRequest) ProtoMessage ¶
func (*GetByUserUUIDRequest) ProtoMessage()
func (*GetByUserUUIDRequest) ProtoReflect ¶
func (x *GetByUserUUIDRequest) ProtoReflect() protoreflect.Message
func (*GetByUserUUIDRequest) Reset ¶
func (x *GetByUserUUIDRequest) Reset()
func (*GetByUserUUIDRequest) String ¶
func (x *GetByUserUUIDRequest) String() string
type GetUserProductRequestParams ¶
type GetUserProductRequestParams struct { UuidIn []string `protobuf:"bytes,1,rep,name=uuid_in,json=uuidIn,proto3" json:"uuid_in,omitempty"` UserUuidIn []string `protobuf:"bytes,2,rep,name=user_uuid_in,json=userUuidIn,proto3" json:"user_uuid_in,omitempty"` ProductUuidIn []string `protobuf:"bytes,3,rep,name=product_uuid_in,json=productUuidIn,proto3" json:"product_uuid_in,omitempty"` // contains filtered or unexported fields }
func (*GetUserProductRequestParams) Descriptor
deprecated
func (*GetUserProductRequestParams) Descriptor() ([]byte, []int)
Deprecated: Use GetUserProductRequestParams.ProtoReflect.Descriptor instead.
func (*GetUserProductRequestParams) GetProductUuidIn ¶
func (x *GetUserProductRequestParams) GetProductUuidIn() []string
func (*GetUserProductRequestParams) GetUserUuidIn ¶
func (x *GetUserProductRequestParams) GetUserUuidIn() []string
func (*GetUserProductRequestParams) GetUuidIn ¶
func (x *GetUserProductRequestParams) GetUuidIn() []string
func (*GetUserProductRequestParams) ProtoMessage ¶
func (*GetUserProductRequestParams) ProtoMessage()
func (*GetUserProductRequestParams) ProtoReflect ¶
func (x *GetUserProductRequestParams) ProtoReflect() protoreflect.Message
func (*GetUserProductRequestParams) Reset ¶
func (x *GetUserProductRequestParams) Reset()
func (*GetUserProductRequestParams) String ¶
func (x *GetUserProductRequestParams) String() string
type Order ¶
type Order struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` UserUuid string `protobuf:"bytes,2,opt,name=user_uuid,json=userUuid,proto3" json:"user_uuid,omitempty"` Amount float64 `protobuf:"fixed64,3,opt,name=amount,proto3" json:"amount,omitempty"` Address string `protobuf:"bytes,4,opt,name=address,proto3" json:"address,omitempty"` Status OrderStatus `protobuf:"varint,5,opt,name=status,proto3,enum=pb.v1.OrderStatus" json:"status,omitempty"` Products []*UserProduct `protobuf:"bytes,6,rep,name=products,proto3" json:"products,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` DeliveredAt *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=delivered_at,json=deliveredAt,proto3" json:"delivered_at,omitempty"` // contains filtered or unexported fields }
func (*Order) Descriptor
deprecated
func (*Order) GetAddress ¶
func (*Order) GetCreatedAt ¶
func (x *Order) GetCreatedAt() *timestamppb.Timestamp
func (*Order) GetDeliveredAt ¶
func (x *Order) GetDeliveredAt() *timestamppb.Timestamp
func (*Order) GetProducts ¶
func (x *Order) GetProducts() []*UserProduct
func (*Order) GetStatus ¶
func (x *Order) GetStatus() OrderStatus
func (*Order) GetUserUuid ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderServiceClient ¶
type OrderServiceClient interface {
Checkout(ctx context.Context, in *CheckoutOrderRequest, opts ...grpc.CallOption) (*Order, error)
}
OrderServiceClient is the client API for OrderService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewOrderServiceClient ¶
func NewOrderServiceClient(cc grpc.ClientConnInterface) OrderServiceClient
type OrderServiceServer ¶
type OrderServiceServer interface {
Checkout(context.Context, *CheckoutOrderRequest) (*Order, error)
}
OrderServiceServer is the server API for OrderService service. All implementations should embed UnimplementedOrderServiceServer for forward compatibility
type OrderStatus ¶
type OrderStatus int32
const ( OrderStatusUnspecified OrderStatus = 0 OrderStatusCreated OrderStatus = 1 OrderStatusPaid OrderStatus = 2 OrderStatusDelivered OrderStatus = 3 )
func (OrderStatus) Descriptor ¶
func (OrderStatus) Descriptor() protoreflect.EnumDescriptor
func (OrderStatus) Enum ¶
func (x OrderStatus) Enum() *OrderStatus
func (OrderStatus) EnumDescriptor
deprecated
func (OrderStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderStatus.Descriptor instead.
func (OrderStatus) Number ¶
func (x OrderStatus) Number() protoreflect.EnumNumber
func (OrderStatus) String ¶
func (x OrderStatus) String() string
func (OrderStatus) Type ¶
func (OrderStatus) Type() protoreflect.EnumType
type Paginator ¶
type Paginator struct { Offset uint32 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"` Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*Paginator) Descriptor
deprecated
func (*Paginator) ProtoMessage ¶
func (*Paginator) ProtoMessage()
func (*Paginator) ProtoReflect ¶
func (x *Paginator) ProtoReflect() protoreflect.Message
type Permission ¶
type Permission int32
const ( PermissionUnspecified Permission = 0 PermissionRead Permission = 1 PermissionWrite Permission = 2 )
func (Permission) Descriptor ¶
func (Permission) Descriptor() protoreflect.EnumDescriptor
func (Permission) Enum ¶
func (x Permission) Enum() *Permission
func (Permission) EnumDescriptor
deprecated
func (Permission) EnumDescriptor() ([]byte, []int)
Deprecated: Use Permission.Descriptor instead.
func (Permission) Number ¶
func (x Permission) Number() protoreflect.EnumNumber
func (Permission) String ¶
func (x Permission) String() string
func (Permission) Type ¶
func (Permission) Type() protoreflect.EnumType
type Product ¶
type Product struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Status ProductStatus `protobuf:"varint,2,opt,name=status,proto3,enum=pb.v1.ProductStatus" json:"status,omitempty"` Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Price float64 `protobuf:"fixed64,4,opt,name=price,proto3" json:"price,omitempty"` Availability bool `protobuf:"varint,5,opt,name=availability,proto3" json:"availability,omitempty"` Properties []*ProductProperty `protobuf:"bytes,6,rep,name=properties,proto3" json:"properties,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) GetAvailability ¶
func (*Product) GetCreatedAt ¶
func (x *Product) GetCreatedAt() *timestamppb.Timestamp
func (*Product) GetProperties ¶
func (x *Product) GetProperties() []*ProductProperty
func (*Product) GetStatus ¶
func (x *Product) GetStatus() ProductStatus
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
type ProductProperty ¶
type ProductProperty struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*ProductProperty) Descriptor
deprecated
func (*ProductProperty) Descriptor() ([]byte, []int)
Deprecated: Use ProductProperty.ProtoReflect.Descriptor instead.
func (*ProductProperty) GetName ¶
func (x *ProductProperty) GetName() string
func (*ProductProperty) GetValue ¶
func (x *ProductProperty) GetValue() string
func (*ProductProperty) ProtoMessage ¶
func (*ProductProperty) ProtoMessage()
func (*ProductProperty) ProtoReflect ¶
func (x *ProductProperty) ProtoReflect() protoreflect.Message
func (*ProductProperty) Reset ¶
func (x *ProductProperty) Reset()
func (*ProductProperty) String ¶
func (x *ProductProperty) String() string
type ProductResponse ¶
type ProductResponse struct { Items []*Product `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*ProductResponse) Descriptor
deprecated
func (*ProductResponse) Descriptor() ([]byte, []int)
Deprecated: Use ProductResponse.ProtoReflect.Descriptor instead.
func (*ProductResponse) GetCount ¶
func (x *ProductResponse) GetCount() uint32
func (*ProductResponse) GetItems ¶
func (x *ProductResponse) GetItems() []*Product
func (*ProductResponse) ProtoMessage ¶
func (*ProductResponse) ProtoMessage()
func (*ProductResponse) ProtoReflect ¶
func (x *ProductResponse) ProtoReflect() protoreflect.Message
func (*ProductResponse) Reset ¶
func (x *ProductResponse) Reset()
func (*ProductResponse) String ¶
func (x *ProductResponse) String() string
type ProductServiceClient ¶
type ProductServiceClient interface { GetAllByFilter(ctx context.Context, in *ProductsRequest, opts ...grpc.CallOption) (*ProductResponse, error) GetByUUID(ctx context.Context, in *GetByProductUUIDRequest, opts ...grpc.CallOption) (*Product, error) }
ProductServiceClient is the client API for ProductService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewProductServiceClient ¶
func NewProductServiceClient(cc grpc.ClientConnInterface) ProductServiceClient
type ProductServiceServer ¶
type ProductServiceServer interface { GetAllByFilter(context.Context, *ProductsRequest) (*ProductResponse, error) GetByUUID(context.Context, *GetByProductUUIDRequest) (*Product, error) }
ProductServiceServer is the server API for ProductService service. All implementations should embed UnimplementedProductServiceServer for forward compatibility
type ProductStatus ¶
type ProductStatus int32
const ( ProductStatusUnspecified ProductStatus = 0 ProductStatusActive ProductStatus = 1 ProductStatusArchived ProductStatus = 2 )
func (ProductStatus) Descriptor ¶
func (ProductStatus) Descriptor() protoreflect.EnumDescriptor
func (ProductStatus) Enum ¶
func (x ProductStatus) Enum() *ProductStatus
func (ProductStatus) EnumDescriptor
deprecated
func (ProductStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use ProductStatus.Descriptor instead.
func (ProductStatus) Number ¶
func (x ProductStatus) Number() protoreflect.EnumNumber
func (ProductStatus) String ¶
func (x ProductStatus) String() string
func (ProductStatus) Type ¶
func (ProductStatus) Type() protoreflect.EnumType
type ProductsRequest ¶
type ProductsRequest struct { Filter *ProductsRequestFilter `protobuf:"bytes,1,opt,name=filter,proto3" json:"filter,omitempty"` Paginator *Paginator `protobuf:"bytes,2,opt,name=paginator,proto3" json:"paginator,omitempty"` // contains filtered or unexported fields }
func (*ProductsRequest) Descriptor
deprecated
func (*ProductsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProductsRequest.ProtoReflect.Descriptor instead.
func (*ProductsRequest) GetFilter ¶
func (x *ProductsRequest) GetFilter() *ProductsRequestFilter
func (*ProductsRequest) GetPaginator ¶
func (x *ProductsRequest) GetPaginator() *Paginator
func (*ProductsRequest) ProtoMessage ¶
func (*ProductsRequest) ProtoMessage()
func (*ProductsRequest) ProtoReflect ¶
func (x *ProductsRequest) ProtoReflect() protoreflect.Message
func (*ProductsRequest) Reset ¶
func (x *ProductsRequest) Reset()
func (*ProductsRequest) String ¶
func (x *ProductsRequest) String() string
type ProductsRequestFilter ¶
type ProductsRequestFilter struct { UuidIn []string `protobuf:"bytes,1,rep,name=uuid_in,json=uuidIn,proto3" json:"uuid_in,omitempty"` NameContains string `protobuf:"bytes,2,opt,name=name_contains,json=nameContains,proto3" json:"name_contains,omitempty"` PriceGt float64 `protobuf:"fixed64,3,opt,name=price_gt,json=priceGt,proto3" json:"price_gt,omitempty"` PriceLt float64 `protobuf:"fixed64,4,opt,name=price_lt,json=priceLt,proto3" json:"price_lt,omitempty"` PropertiesEq []*ProductProperty `protobuf:"bytes,5,rep,name=properties_eq,json=propertiesEq,proto3" json:"properties_eq,omitempty"` // contains filtered or unexported fields }
func (*ProductsRequestFilter) Descriptor
deprecated
func (*ProductsRequestFilter) Descriptor() ([]byte, []int)
Deprecated: Use ProductsRequestFilter.ProtoReflect.Descriptor instead.
func (*ProductsRequestFilter) GetNameContains ¶
func (x *ProductsRequestFilter) GetNameContains() string
func (*ProductsRequestFilter) GetPriceGt ¶
func (x *ProductsRequestFilter) GetPriceGt() float64
func (*ProductsRequestFilter) GetPriceLt ¶
func (x *ProductsRequestFilter) GetPriceLt() float64
func (*ProductsRequestFilter) GetPropertiesEq ¶
func (x *ProductsRequestFilter) GetPropertiesEq() []*ProductProperty
func (*ProductsRequestFilter) GetUuidIn ¶
func (x *ProductsRequestFilter) GetUuidIn() []string
func (*ProductsRequestFilter) ProtoMessage ¶
func (*ProductsRequestFilter) ProtoMessage()
func (*ProductsRequestFilter) ProtoReflect ¶
func (x *ProductsRequestFilter) ProtoReflect() protoreflect.Message
func (*ProductsRequestFilter) Reset ¶
func (x *ProductsRequestFilter) Reset()
func (*ProductsRequestFilter) String ¶
func (x *ProductsRequestFilter) String() string
type PutProductRequest ¶
type PutProductRequest struct { UserUuid string `protobuf:"bytes,1,opt,name=user_uuid,json=userUuid,proto3" json:"user_uuid,omitempty"` Params *PutProductRequestParams `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
func (*PutProductRequest) Descriptor
deprecated
func (*PutProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use PutProductRequest.ProtoReflect.Descriptor instead.
func (*PutProductRequest) GetParams ¶
func (x *PutProductRequest) GetParams() *PutProductRequestParams
func (*PutProductRequest) GetUserUuid ¶
func (x *PutProductRequest) GetUserUuid() string
func (*PutProductRequest) ProtoMessage ¶
func (*PutProductRequest) ProtoMessage()
func (*PutProductRequest) ProtoReflect ¶
func (x *PutProductRequest) ProtoReflect() protoreflect.Message
func (*PutProductRequest) Reset ¶
func (x *PutProductRequest) Reset()
func (*PutProductRequest) String ¶
func (x *PutProductRequest) String() string
type PutProductRequestParams ¶
type PutProductRequestParams struct { ProductUuid string `protobuf:"bytes,1,opt,name=product_uuid,json=productUuid,proto3" json:"product_uuid,omitempty"` ProductCount uint32 `protobuf:"varint,2,opt,name=product_count,json=productCount,proto3" json:"product_count,omitempty"` // contains filtered or unexported fields }
func (*PutProductRequestParams) Descriptor
deprecated
func (*PutProductRequestParams) Descriptor() ([]byte, []int)
Deprecated: Use PutProductRequestParams.ProtoReflect.Descriptor instead.
func (*PutProductRequestParams) GetProductCount ¶
func (x *PutProductRequestParams) GetProductCount() uint32
func (*PutProductRequestParams) GetProductUuid ¶
func (x *PutProductRequestParams) GetProductUuid() string
func (*PutProductRequestParams) ProtoMessage ¶
func (*PutProductRequestParams) ProtoMessage()
func (*PutProductRequestParams) ProtoReflect ¶
func (x *PutProductRequestParams) ProtoReflect() protoreflect.Message
func (*PutProductRequestParams) Reset ¶
func (x *PutProductRequestParams) Reset()
func (*PutProductRequestParams) String ¶
func (x *PutProductRequestParams) String() string
type RegisterRequest ¶
type RegisterRequest struct { PhoneNumber string `protobuf:"bytes,1,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` // contains filtered or unexported fields }
func (*RegisterRequest) Descriptor
deprecated
func (*RegisterRequest) Descriptor() ([]byte, []int)
Deprecated: Use RegisterRequest.ProtoReflect.Descriptor instead.
func (*RegisterRequest) GetPhoneNumber ¶
func (x *RegisterRequest) GetPhoneNumber() string
func (*RegisterRequest) ProtoMessage ¶
func (*RegisterRequest) ProtoMessage()
func (*RegisterRequest) ProtoReflect ¶
func (x *RegisterRequest) ProtoReflect() protoreflect.Message
func (*RegisterRequest) Reset ¶
func (x *RegisterRequest) Reset()
func (*RegisterRequest) String ¶
func (x *RegisterRequest) String() string
type Role ¶
type Role int32
func (Role) Descriptor ¶
func (Role) Descriptor() protoreflect.EnumDescriptor
func (Role) EnumDescriptor
deprecated
func (Role) Number ¶
func (x Role) Number() protoreflect.EnumNumber
func (Role) Type ¶
func (Role) Type() protoreflect.EnumType
type Session ¶
type Session struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Group UserGroup `protobuf:"varint,2,opt,name=group,proto3,enum=pb.v1.UserGroup" json:"group,omitempty"` // contains filtered or unexported fields }
func (*Session) Descriptor
deprecated
func (*Session) ProtoMessage ¶
func (*Session) ProtoMessage()
func (*Session) ProtoReflect ¶
func (x *Session) ProtoReflect() protoreflect.Message
type TokenResponse ¶
type TokenResponse struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*TokenResponse) Descriptor
deprecated
func (*TokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use TokenResponse.ProtoReflect.Descriptor instead.
func (*TokenResponse) GetToken ¶
func (x *TokenResponse) GetToken() string
func (*TokenResponse) ProtoMessage ¶
func (*TokenResponse) ProtoMessage()
func (*TokenResponse) ProtoReflect ¶
func (x *TokenResponse) ProtoReflect() protoreflect.Message
func (*TokenResponse) Reset ¶
func (x *TokenResponse) Reset()
func (*TokenResponse) String ¶
func (x *TokenResponse) String() string
type UnimplementedOrderServiceServer ¶
type UnimplementedOrderServiceServer struct { }
UnimplementedOrderServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedOrderServiceServer) Checkout ¶
func (UnimplementedOrderServiceServer) Checkout(context.Context, *CheckoutOrderRequest) (*Order, error)
type UnimplementedProductServiceServer ¶
type UnimplementedProductServiceServer struct { }
UnimplementedProductServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedProductServiceServer) GetAllByFilter ¶
func (UnimplementedProductServiceServer) GetAllByFilter(context.Context, *ProductsRequest) (*ProductResponse, error)
func (UnimplementedProductServiceServer) GetByUUID ¶
func (UnimplementedProductServiceServer) GetByUUID(context.Context, *GetByProductUUIDRequest) (*Product, error)
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) Authorize ¶
func (UnimplementedUserServiceServer) Authorize(context.Context, *AuthorizeRequest) (*TokenResponse, error)
func (UnimplementedUserServiceServer) ChangeProduct ¶
func (UnimplementedUserServiceServer) ChangeProduct(context.Context, *ChangeProductRequest) (*UserProductsResponse, error)
func (UnimplementedUserServiceServer) CreateOrder ¶
func (UnimplementedUserServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*Order, error)
func (UnimplementedUserServiceServer) GetByUUID ¶
func (UnimplementedUserServiceServer) GetByUUID(context.Context, *GetByUserUUIDRequest) (*User, error)
func (UnimplementedUserServiceServer) GetUserProducts ¶
func (UnimplementedUserServiceServer) GetUserProducts(context.Context, *GetByUserUUIDRequest) (*UserProductsResponse, error)
func (UnimplementedUserServiceServer) PutProduct ¶
func (UnimplementedUserServiceServer) PutProduct(context.Context, *PutProductRequest) (*UserProductsResponse, error)
func (UnimplementedUserServiceServer) Register ¶
func (UnimplementedUserServiceServer) Register(context.Context, *RegisterRequest) (*TokenResponse, error)
type UnsafeOrderServiceServer ¶
type UnsafeOrderServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOrderServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrderServiceServer will result in compilation errors.
type UnsafeProductServiceServer ¶
type UnsafeProductServiceServer interface {
// contains filtered or unexported methods
}
UnsafeProductServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProductServiceServer will result in compilation errors.
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type User ¶
type User struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` Group UserGroup `protobuf:"varint,2,opt,name=group,proto3,enum=pb.v1.UserGroup" json:"group,omitempty"` Status UserStatus `protobuf:"varint,3,opt,name=status,proto3,enum=pb.v1.UserStatus" json:"status,omitempty"` PhoneNumber string `protobuf:"bytes,4,opt,name=phone_number,json=phoneNumber,proto3" json:"phone_number,omitempty"` Lastname string `protobuf:"bytes,5,opt,name=lastname,proto3" json:"lastname,omitempty"` Firstname string `protobuf:"bytes,6,opt,name=firstname,proto3" json:"firstname,omitempty"` CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetCreatedAt ¶
func (x *User) GetCreatedAt() *timestamppb.Timestamp
func (*User) GetFirstname ¶
func (*User) GetLastname ¶
func (*User) GetPhoneNumber ¶
func (*User) GetStatus ¶
func (x *User) GetStatus() UserStatus
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserGroup ¶
type UserGroup int32
func (UserGroup) Descriptor ¶
func (UserGroup) Descriptor() protoreflect.EnumDescriptor
func (UserGroup) EnumDescriptor
deprecated
func (UserGroup) Number ¶
func (x UserGroup) Number() protoreflect.EnumNumber
func (UserGroup) Type ¶
func (UserGroup) Type() protoreflect.EnumType
type UserProduct ¶
type UserProduct struct { Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` ProductUuid string `protobuf:"bytes,2,opt,name=product_uuid,json=productUuid,proto3" json:"product_uuid,omitempty"` Count uint32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*UserProduct) Descriptor
deprecated
func (*UserProduct) Descriptor() ([]byte, []int)
Deprecated: Use UserProduct.ProtoReflect.Descriptor instead.
func (*UserProduct) GetCount ¶
func (x *UserProduct) GetCount() uint32
func (*UserProduct) GetProductUuid ¶
func (x *UserProduct) GetProductUuid() string
func (*UserProduct) GetUuid ¶
func (x *UserProduct) GetUuid() string
func (*UserProduct) ProtoMessage ¶
func (*UserProduct) ProtoMessage()
func (*UserProduct) ProtoReflect ¶
func (x *UserProduct) ProtoReflect() protoreflect.Message
func (*UserProduct) Reset ¶
func (x *UserProduct) Reset()
func (*UserProduct) String ¶
func (x *UserProduct) String() string
type UserProductsResponse ¶
type UserProductsResponse struct { Products []*UserProduct `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` Count uint32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` // contains filtered or unexported fields }
func (*UserProductsResponse) Descriptor
deprecated
func (*UserProductsResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserProductsResponse.ProtoReflect.Descriptor instead.
func (*UserProductsResponse) GetCount ¶
func (x *UserProductsResponse) GetCount() uint32
func (*UserProductsResponse) GetProducts ¶
func (x *UserProductsResponse) GetProducts() []*UserProduct
func (*UserProductsResponse) ProtoMessage ¶
func (*UserProductsResponse) ProtoMessage()
func (*UserProductsResponse) ProtoReflect ¶
func (x *UserProductsResponse) ProtoReflect() protoreflect.Message
func (*UserProductsResponse) Reset ¶
func (x *UserProductsResponse) Reset()
func (*UserProductsResponse) String ¶
func (x *UserProductsResponse) String() string
type UserServiceClient ¶
type UserServiceClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*TokenResponse, error) Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*TokenResponse, error) GetByUUID(ctx context.Context, in *GetByUserUUIDRequest, opts ...grpc.CallOption) (*User, error) GetUserProducts(ctx context.Context, in *GetByUserUUIDRequest, opts ...grpc.CallOption) (*UserProductsResponse, error) PutProduct(ctx context.Context, in *PutProductRequest, opts ...grpc.CallOption) (*UserProductsResponse, error) ChangeProduct(ctx context.Context, in *ChangeProductRequest, opts ...grpc.CallOption) (*UserProductsResponse, error) CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*Order, error) }
UserServiceClient is the client API for UserService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { Register(context.Context, *RegisterRequest) (*TokenResponse, error) Authorize(context.Context, *AuthorizeRequest) (*TokenResponse, error) GetByUUID(context.Context, *GetByUserUUIDRequest) (*User, error) GetUserProducts(context.Context, *GetByUserUUIDRequest) (*UserProductsResponse, error) PutProduct(context.Context, *PutProductRequest) (*UserProductsResponse, error) ChangeProduct(context.Context, *ChangeProductRequest) (*UserProductsResponse, error) CreateOrder(context.Context, *CreateOrderRequest) (*Order, error) }
UserServiceServer is the server API for UserService service. All implementations should embed UnimplementedUserServiceServer for forward compatibility
type UserStatus ¶
type UserStatus int32
const ( UserStatusUnspecified UserStatus = 0 UserStatusUnconfirmed UserStatus = 1 UserStatusActive UserStatus = 2 UserStatusBlocked UserStatus = 3 )
func (UserStatus) Descriptor ¶
func (UserStatus) Descriptor() protoreflect.EnumDescriptor
func (UserStatus) Enum ¶
func (x UserStatus) Enum() *UserStatus
func (UserStatus) EnumDescriptor
deprecated
func (UserStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use UserStatus.Descriptor instead.
func (UserStatus) Number ¶
func (x UserStatus) Number() protoreflect.EnumNumber
func (UserStatus) String ¶
func (x UserStatus) String() string
func (UserStatus) Type ¶
func (UserStatus) Type() protoreflect.EnumType