Documentation ¶
Index ¶
- Variables
- func RegisterPurchaseServiceServer(s grpc.ServiceRegistrar, srv PurchaseServiceServer)
- type BuyReservationRequest
- func (*BuyReservationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BuyReservationRequest) GetIsSocialCard() bool
- func (x *BuyReservationRequest) GetPharmacyId() int64
- func (x *BuyReservationRequest) GetPurchaseUuid() string
- func (x *BuyReservationRequest) GetUserId() int64
- func (*BuyReservationRequest) ProtoMessage()
- func (x *BuyReservationRequest) ProtoReflect() protoreflect.Message
- func (x *BuyReservationRequest) Reset()
- func (x *BuyReservationRequest) String() string
- func (m *BuyReservationRequest) Validate() error
- func (m *BuyReservationRequest) ValidateAll() error
- type BuyReservationRequestMultiError
- type BuyReservationRequestValidationError
- func (e BuyReservationRequestValidationError) Cause() error
- func (e BuyReservationRequestValidationError) Error() string
- func (e BuyReservationRequestValidationError) ErrorName() string
- func (e BuyReservationRequestValidationError) Field() string
- func (e BuyReservationRequestValidationError) Key() bool
- func (e BuyReservationRequestValidationError) Reason() string
- type GetReservationRequest
- func (*GetReservationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetReservationRequest) GetIsSocialCard() bool
- func (x *GetReservationRequest) GetPharmacyId() int64
- func (x *GetReservationRequest) GetPurchaseUuid() string
- func (*GetReservationRequest) ProtoMessage()
- func (x *GetReservationRequest) ProtoReflect() protoreflect.Message
- func (x *GetReservationRequest) Reset()
- func (x *GetReservationRequest) String() string
- func (m *GetReservationRequest) Validate() error
- func (m *GetReservationRequest) ValidateAll() error
- type GetReservationRequestMultiError
- type GetReservationRequestValidationError
- func (e GetReservationRequestValidationError) Cause() error
- func (e GetReservationRequestValidationError) Error() string
- func (e GetReservationRequestValidationError) ErrorName() string
- func (e GetReservationRequestValidationError) Field() string
- func (e GetReservationRequestValidationError) Key() bool
- func (e GetReservationRequestValidationError) Reason() string
- type PaginationRequest
- func (*PaginationRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PaginationRequest) GetLastId() int64
- func (x *PaginationRequest) GetLimit() int64
- func (*PaginationRequest) ProtoMessage()
- func (x *PaginationRequest) ProtoReflect() protoreflect.Message
- func (x *PaginationRequest) Reset()
- func (x *PaginationRequest) String() string
- func (m *PaginationRequest) Validate() error
- func (m *PaginationRequest) ValidateAll() error
- type PaginationRequestMultiError
- type PaginationRequestValidationError
- func (e PaginationRequestValidationError) Cause() error
- func (e PaginationRequestValidationError) Error() string
- func (e PaginationRequestValidationError) ErrorName() string
- func (e PaginationRequestValidationError) Field() string
- func (e PaginationRequestValidationError) Key() bool
- func (e PaginationRequestValidationError) Reason() string
- type PharmacyID
- func (*PharmacyID) Descriptor() ([]byte, []int)deprecated
- func (x *PharmacyID) GetPharmacyId() int64
- func (*PharmacyID) ProtoMessage()
- func (x *PharmacyID) ProtoReflect() protoreflect.Message
- func (x *PharmacyID) Reset()
- func (x *PharmacyID) String() string
- func (m *PharmacyID) Validate() error
- func (m *PharmacyID) ValidateAll() error
- type PharmacyIDMultiError
- type PharmacyIDValidationError
- type Product
- func (*Product) Descriptor() ([]byte, []int)deprecated
- func (x *Product) GetCount() int64
- func (x *Product) GetName() string
- func (x *Product) GetNeedPrescriptionForMedicine() bool
- func (x *Product) GetPosition() string
- func (x *Product) GetPrice() int64
- func (*Product) ProtoMessage()
- func (x *Product) ProtoReflect() protoreflect.Message
- func (x *Product) Reset()
- func (x *Product) String() string
- func (m *Product) Validate() error
- func (m *Product) ValidateAll() error
- type ProductMultiError
- type ProductValidationError
- type Products
- func (*Products) Descriptor() ([]byte, []int)deprecated
- func (x *Products) GetProducts() []*Product
- func (*Products) ProtoMessage()
- func (x *Products) ProtoReflect() protoreflect.Message
- func (x *Products) Reset()
- func (x *Products) String() string
- func (m *Products) Validate() error
- func (m *Products) ValidateAll() error
- type ProductsMultiError
- type ProductsValidationError
- type PurchaseServiceClient
- type PurchaseServiceServer
- type Reservation
- func (*Reservation) Descriptor() ([]byte, []int)deprecated
- func (x *Reservation) GetItems() []*ReservationProductInfo
- func (x *Reservation) GetSummaryPrice() int64
- func (*Reservation) ProtoMessage()
- func (x *Reservation) ProtoReflect() protoreflect.Message
- func (x *Reservation) Reset()
- func (x *Reservation) String() string
- func (m *Reservation) Validate() error
- func (m *Reservation) ValidateAll() error
- type ReservationMultiError
- type ReservationProductInfo
- func (*ReservationProductInfo) Descriptor() ([]byte, []int)deprecated
- func (x *ReservationProductInfo) GetCount() int64
- func (x *ReservationProductInfo) GetName() string
- func (x *ReservationProductInfo) GetPrice() int64
- func (*ReservationProductInfo) ProtoMessage()
- func (x *ReservationProductInfo) ProtoReflect() protoreflect.Message
- func (x *ReservationProductInfo) Reset()
- func (x *ReservationProductInfo) String() string
- func (m *ReservationProductInfo) Validate() error
- func (m *ReservationProductInfo) ValidateAll() error
- type ReservationProductInfoMultiError
- type ReservationProductInfoValidationError
- func (e ReservationProductInfoValidationError) Cause() error
- func (e ReservationProductInfoValidationError) Error() string
- func (e ReservationProductInfoValidationError) ErrorName() string
- func (e ReservationProductInfoValidationError) Field() string
- func (e ReservationProductInfoValidationError) Key() bool
- func (e ReservationProductInfoValidationError) Reason() string
- type ReservationValidationError
- func (e ReservationValidationError) Cause() error
- func (e ReservationValidationError) Error() string
- func (e ReservationValidationError) ErrorName() string
- func (e ReservationValidationError) Field() string
- func (e ReservationValidationError) Key() bool
- func (e ReservationValidationError) Reason() string
- type ReserveItemRequest
- func (*ReserveItemRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ReserveItemRequest) GetItemName() string
- func (x *ReserveItemRequest) GetPharmacyId() int64
- func (x *ReserveItemRequest) GetPosition() string
- func (x *ReserveItemRequest) GetPurchaseUuid() string
- func (*ReserveItemRequest) ProtoMessage()
- func (x *ReserveItemRequest) ProtoReflect() protoreflect.Message
- func (x *ReserveItemRequest) Reset()
- func (x *ReserveItemRequest) String() string
- func (m *ReserveItemRequest) Validate() error
- func (m *ReserveItemRequest) ValidateAll() error
- type ReserveItemRequestMultiError
- type ReserveItemRequestValidationError
- func (e ReserveItemRequestValidationError) Cause() error
- func (e ReserveItemRequestValidationError) Error() string
- func (e ReserveItemRequestValidationError) ErrorName() string
- func (e ReserveItemRequestValidationError) Field() string
- func (e ReserveItemRequestValidationError) Key() bool
- func (e ReserveItemRequestValidationError) Reason() string
- type UnimplementedPurchaseServiceServer
- func (UnimplementedPurchaseServiceServer) BuyReservation(context.Context, *BuyReservationRequest) (*emptypb.Empty, error)
- func (UnimplementedPurchaseServiceServer) CancelReserveItem(context.Context, *ReserveItemRequest) (*emptypb.Empty, error)
- func (UnimplementedPurchaseServiceServer) GetAvailableProductsToReservation(context.Context, *PharmacyID) (*Products, error)
- func (UnimplementedPurchaseServiceServer) GetReservation(context.Context, *GetReservationRequest) (*Reservation, error)
- func (UnimplementedPurchaseServiceServer) ReserveItem(context.Context, *ReserveItemRequest) (*emptypb.Empty, error)
- type UnsafePurchaseServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_purchase_proto protoreflect.FileDescriptor
var PurchaseService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "purchaseService.PurchaseService", HandlerType: (*PurchaseServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ReserveItem", Handler: _PurchaseService_ReserveItem_Handler, }, { MethodName: "CancelReserveItem", Handler: _PurchaseService_CancelReserveItem_Handler, }, { MethodName: "GetReservation", Handler: _PurchaseService_GetReservation_Handler, }, { MethodName: "BuyReservation", Handler: _PurchaseService_BuyReservation_Handler, }, { MethodName: "GetAvailableProductsToReservation", Handler: _PurchaseService_GetAvailableProductsToReservation_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "purchase.proto", }
PurchaseService_ServiceDesc is the grpc.ServiceDesc for PurchaseService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPurchaseServiceServer ¶
func RegisterPurchaseServiceServer(s grpc.ServiceRegistrar, srv PurchaseServiceServer)
Types ¶
type BuyReservationRequest ¶
type BuyReservationRequest struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` PharmacyId int64 `protobuf:"varint,2,opt,name=pharmacy_id,json=pharmacyId,proto3" json:"pharmacy_id,omitempty"` PurchaseUuid string `protobuf:"bytes,3,opt,name=purchase_uuid,json=purchaseUuid,proto3" json:"purchase_uuid,omitempty"` IsSocialCard bool `protobuf:"varint,4,opt,name=is_social_card,json=isSocialCard,proto3" json:"is_social_card,omitempty"` // contains filtered or unexported fields }
func (*BuyReservationRequest) Descriptor
deprecated
func (*BuyReservationRequest) Descriptor() ([]byte, []int)
Deprecated: Use BuyReservationRequest.ProtoReflect.Descriptor instead.
func (*BuyReservationRequest) GetIsSocialCard ¶
func (x *BuyReservationRequest) GetIsSocialCard() bool
func (*BuyReservationRequest) GetPharmacyId ¶
func (x *BuyReservationRequest) GetPharmacyId() int64
func (*BuyReservationRequest) GetPurchaseUuid ¶
func (x *BuyReservationRequest) GetPurchaseUuid() string
func (*BuyReservationRequest) GetUserId ¶
func (x *BuyReservationRequest) GetUserId() int64
func (*BuyReservationRequest) ProtoMessage ¶
func (*BuyReservationRequest) ProtoMessage()
func (*BuyReservationRequest) ProtoReflect ¶
func (x *BuyReservationRequest) ProtoReflect() protoreflect.Message
func (*BuyReservationRequest) Reset ¶
func (x *BuyReservationRequest) Reset()
func (*BuyReservationRequest) String ¶
func (x *BuyReservationRequest) String() string
func (*BuyReservationRequest) Validate ¶
func (m *BuyReservationRequest) Validate() error
Validate checks the field values on BuyReservationRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*BuyReservationRequest) ValidateAll ¶
func (m *BuyReservationRequest) ValidateAll() error
ValidateAll checks the field values on BuyReservationRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in BuyReservationRequestMultiError, or nil if none found.
type BuyReservationRequestMultiError ¶
type BuyReservationRequestMultiError []error
BuyReservationRequestMultiError is an error wrapping multiple validation errors returned by BuyReservationRequest.ValidateAll() if the designated constraints aren't met.
func (BuyReservationRequestMultiError) AllErrors ¶
func (m BuyReservationRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (BuyReservationRequestMultiError) Error ¶
func (m BuyReservationRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type BuyReservationRequestValidationError ¶
type BuyReservationRequestValidationError struct {
// contains filtered or unexported fields
}
BuyReservationRequestValidationError is the validation error returned by BuyReservationRequest.Validate if the designated constraints aren't met.
func (BuyReservationRequestValidationError) Cause ¶
func (e BuyReservationRequestValidationError) Cause() error
Cause function returns cause value.
func (BuyReservationRequestValidationError) Error ¶
func (e BuyReservationRequestValidationError) Error() string
Error satisfies the builtin error interface
func (BuyReservationRequestValidationError) ErrorName ¶
func (e BuyReservationRequestValidationError) ErrorName() string
ErrorName returns error name.
func (BuyReservationRequestValidationError) Field ¶
func (e BuyReservationRequestValidationError) Field() string
Field function returns field value.
func (BuyReservationRequestValidationError) Key ¶
func (e BuyReservationRequestValidationError) Key() bool
Key function returns key value.
func (BuyReservationRequestValidationError) Reason ¶
func (e BuyReservationRequestValidationError) Reason() string
Reason function returns reason value.
type GetReservationRequest ¶
type GetReservationRequest struct { PharmacyId int64 `protobuf:"varint,1,opt,name=pharmacy_id,json=pharmacyId,proto3" json:"pharmacy_id,omitempty"` PurchaseUuid string `protobuf:"bytes,2,opt,name=purchase_uuid,json=purchaseUuid,proto3" json:"purchase_uuid,omitempty"` IsSocialCard bool `protobuf:"varint,3,opt,name=is_social_card,json=isSocialCard,proto3" json:"is_social_card,omitempty"` // contains filtered or unexported fields }
func (*GetReservationRequest) Descriptor
deprecated
func (*GetReservationRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetReservationRequest.ProtoReflect.Descriptor instead.
func (*GetReservationRequest) GetIsSocialCard ¶
func (x *GetReservationRequest) GetIsSocialCard() bool
func (*GetReservationRequest) GetPharmacyId ¶
func (x *GetReservationRequest) GetPharmacyId() int64
func (*GetReservationRequest) GetPurchaseUuid ¶
func (x *GetReservationRequest) GetPurchaseUuid() string
func (*GetReservationRequest) ProtoMessage ¶
func (*GetReservationRequest) ProtoMessage()
func (*GetReservationRequest) ProtoReflect ¶
func (x *GetReservationRequest) ProtoReflect() protoreflect.Message
func (*GetReservationRequest) Reset ¶
func (x *GetReservationRequest) Reset()
func (*GetReservationRequest) String ¶
func (x *GetReservationRequest) String() string
func (*GetReservationRequest) Validate ¶
func (m *GetReservationRequest) Validate() error
Validate checks the field values on GetReservationRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*GetReservationRequest) ValidateAll ¶
func (m *GetReservationRequest) ValidateAll() error
ValidateAll checks the field values on GetReservationRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetReservationRequestMultiError, or nil if none found.
type GetReservationRequestMultiError ¶
type GetReservationRequestMultiError []error
GetReservationRequestMultiError is an error wrapping multiple validation errors returned by GetReservationRequest.ValidateAll() if the designated constraints aren't met.
func (GetReservationRequestMultiError) AllErrors ¶
func (m GetReservationRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetReservationRequestMultiError) Error ¶
func (m GetReservationRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetReservationRequestValidationError ¶
type GetReservationRequestValidationError struct {
// contains filtered or unexported fields
}
GetReservationRequestValidationError is the validation error returned by GetReservationRequest.Validate if the designated constraints aren't met.
func (GetReservationRequestValidationError) Cause ¶
func (e GetReservationRequestValidationError) Cause() error
Cause function returns cause value.
func (GetReservationRequestValidationError) Error ¶
func (e GetReservationRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetReservationRequestValidationError) ErrorName ¶
func (e GetReservationRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetReservationRequestValidationError) Field ¶
func (e GetReservationRequestValidationError) Field() string
Field function returns field value.
func (GetReservationRequestValidationError) Key ¶
func (e GetReservationRequestValidationError) Key() bool
Key function returns key value.
func (GetReservationRequestValidationError) Reason ¶
func (e GetReservationRequestValidationError) Reason() string
Reason function returns reason value.
type PaginationRequest ¶
type PaginationRequest struct { LastId int64 `protobuf:"varint,1,opt,name=last_id,json=lastId,proto3" json:"last_id,omitempty"` Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*PaginationRequest) Descriptor
deprecated
func (*PaginationRequest) Descriptor() ([]byte, []int)
Deprecated: Use PaginationRequest.ProtoReflect.Descriptor instead.
func (*PaginationRequest) GetLastId ¶
func (x *PaginationRequest) GetLastId() int64
func (*PaginationRequest) GetLimit ¶
func (x *PaginationRequest) GetLimit() int64
func (*PaginationRequest) ProtoMessage ¶
func (*PaginationRequest) ProtoMessage()
func (*PaginationRequest) ProtoReflect ¶
func (x *PaginationRequest) ProtoReflect() protoreflect.Message
func (*PaginationRequest) Reset ¶
func (x *PaginationRequest) Reset()
func (*PaginationRequest) String ¶
func (x *PaginationRequest) String() string
func (*PaginationRequest) Validate ¶
func (m *PaginationRequest) Validate() error
Validate checks the field values on PaginationRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*PaginationRequest) ValidateAll ¶
func (m *PaginationRequest) ValidateAll() error
ValidateAll checks the field values on PaginationRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PaginationRequestMultiError, or nil if none found.
type PaginationRequestMultiError ¶
type PaginationRequestMultiError []error
PaginationRequestMultiError is an error wrapping multiple validation errors returned by PaginationRequest.ValidateAll() if the designated constraints aren't met.
func (PaginationRequestMultiError) AllErrors ¶
func (m PaginationRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PaginationRequestMultiError) Error ¶
func (m PaginationRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PaginationRequestValidationError ¶
type PaginationRequestValidationError struct {
// contains filtered or unexported fields
}
PaginationRequestValidationError is the validation error returned by PaginationRequest.Validate if the designated constraints aren't met.
func (PaginationRequestValidationError) Cause ¶
func (e PaginationRequestValidationError) Cause() error
Cause function returns cause value.
func (PaginationRequestValidationError) Error ¶
func (e PaginationRequestValidationError) Error() string
Error satisfies the builtin error interface
func (PaginationRequestValidationError) ErrorName ¶
func (e PaginationRequestValidationError) ErrorName() string
ErrorName returns error name.
func (PaginationRequestValidationError) Field ¶
func (e PaginationRequestValidationError) Field() string
Field function returns field value.
func (PaginationRequestValidationError) Key ¶
func (e PaginationRequestValidationError) Key() bool
Key function returns key value.
func (PaginationRequestValidationError) Reason ¶
func (e PaginationRequestValidationError) Reason() string
Reason function returns reason value.
type PharmacyID ¶
type PharmacyID struct { PharmacyId int64 `protobuf:"varint,1,opt,name=pharmacy_id,json=pharmacyId,proto3" json:"pharmacy_id,omitempty"` // contains filtered or unexported fields }
func (*PharmacyID) Descriptor
deprecated
func (*PharmacyID) Descriptor() ([]byte, []int)
Deprecated: Use PharmacyID.ProtoReflect.Descriptor instead.
func (*PharmacyID) GetPharmacyId ¶
func (x *PharmacyID) GetPharmacyId() int64
func (*PharmacyID) ProtoMessage ¶
func (*PharmacyID) ProtoMessage()
func (*PharmacyID) ProtoReflect ¶
func (x *PharmacyID) ProtoReflect() protoreflect.Message
func (*PharmacyID) Reset ¶
func (x *PharmacyID) Reset()
func (*PharmacyID) String ¶
func (x *PharmacyID) String() string
func (*PharmacyID) Validate ¶
func (m *PharmacyID) Validate() error
Validate checks the field values on PharmacyID with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*PharmacyID) ValidateAll ¶
func (m *PharmacyID) ValidateAll() error
ValidateAll checks the field values on PharmacyID with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in PharmacyIDMultiError, or nil if none found.
type PharmacyIDMultiError ¶
type PharmacyIDMultiError []error
PharmacyIDMultiError is an error wrapping multiple validation errors returned by PharmacyID.ValidateAll() if the designated constraints aren't met.
func (PharmacyIDMultiError) AllErrors ¶
func (m PharmacyIDMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PharmacyIDMultiError) Error ¶
func (m PharmacyIDMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PharmacyIDValidationError ¶
type PharmacyIDValidationError struct {
// contains filtered or unexported fields
}
PharmacyIDValidationError is the validation error returned by PharmacyID.Validate if the designated constraints aren't met.
func (PharmacyIDValidationError) Cause ¶
func (e PharmacyIDValidationError) Cause() error
Cause function returns cause value.
func (PharmacyIDValidationError) Error ¶
func (e PharmacyIDValidationError) Error() string
Error satisfies the builtin error interface
func (PharmacyIDValidationError) ErrorName ¶
func (e PharmacyIDValidationError) ErrorName() string
ErrorName returns error name.
func (PharmacyIDValidationError) Field ¶
func (e PharmacyIDValidationError) Field() string
Field function returns field value.
func (PharmacyIDValidationError) Key ¶
func (e PharmacyIDValidationError) Key() bool
Key function returns key value.
func (PharmacyIDValidationError) Reason ¶
func (e PharmacyIDValidationError) Reason() string
Reason function returns reason value.
type Product ¶
type Product struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Price int64 `protobuf:"varint,2,opt,name=price,proto3" json:"price,omitempty"` Count int64 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` Position string `protobuf:"bytes,4,opt,name=position,proto3" json:"position,omitempty"` NeedPrescriptionForMedicine bool `` /* 147-byte string literal not displayed */ // contains filtered or unexported fields }
func (*Product) Descriptor
deprecated
func (*Product) GetNeedPrescriptionForMedicine ¶
func (*Product) GetPosition ¶
func (*Product) ProtoMessage ¶
func (*Product) ProtoMessage()
func (*Product) ProtoReflect ¶
func (x *Product) ProtoReflect() protoreflect.Message
func (*Product) Validate ¶
Validate checks the field values on Product with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Product) ValidateAll ¶
ValidateAll checks the field values on Product with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ProductMultiError, or nil if none found.
type ProductMultiError ¶
type ProductMultiError []error
ProductMultiError is an error wrapping multiple validation errors returned by Product.ValidateAll() if the designated constraints aren't met.
func (ProductMultiError) AllErrors ¶
func (m ProductMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ProductMultiError) Error ¶
func (m ProductMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ProductValidationError ¶
type ProductValidationError struct {
// contains filtered or unexported fields
}
ProductValidationError is the validation error returned by Product.Validate if the designated constraints aren't met.
func (ProductValidationError) Cause ¶
func (e ProductValidationError) Cause() error
Cause function returns cause value.
func (ProductValidationError) Error ¶
func (e ProductValidationError) Error() string
Error satisfies the builtin error interface
func (ProductValidationError) ErrorName ¶
func (e ProductValidationError) ErrorName() string
ErrorName returns error name.
func (ProductValidationError) Field ¶
func (e ProductValidationError) Field() string
Field function returns field value.
func (ProductValidationError) Key ¶
func (e ProductValidationError) Key() bool
Key function returns key value.
func (ProductValidationError) Reason ¶
func (e ProductValidationError) Reason() string
Reason function returns reason value.
type Products ¶
type Products struct { Products []*Product `protobuf:"bytes,1,rep,name=products,proto3" json:"products,omitempty"` // contains filtered or unexported fields }
func (*Products) Descriptor
deprecated
func (*Products) GetProducts ¶
func (*Products) ProtoMessage ¶
func (*Products) ProtoMessage()
func (*Products) ProtoReflect ¶
func (x *Products) ProtoReflect() protoreflect.Message
func (*Products) Validate ¶
Validate checks the field values on Products with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Products) ValidateAll ¶
ValidateAll checks the field values on Products with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ProductsMultiError, or nil if none found.
type ProductsMultiError ¶
type ProductsMultiError []error
ProductsMultiError is an error wrapping multiple validation errors returned by Products.ValidateAll() if the designated constraints aren't met.
func (ProductsMultiError) AllErrors ¶
func (m ProductsMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ProductsMultiError) Error ¶
func (m ProductsMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ProductsValidationError ¶
type ProductsValidationError struct {
// contains filtered or unexported fields
}
ProductsValidationError is the validation error returned by Products.Validate if the designated constraints aren't met.
func (ProductsValidationError) Cause ¶
func (e ProductsValidationError) Cause() error
Cause function returns cause value.
func (ProductsValidationError) Error ¶
func (e ProductsValidationError) Error() string
Error satisfies the builtin error interface
func (ProductsValidationError) ErrorName ¶
func (e ProductsValidationError) ErrorName() string
ErrorName returns error name.
func (ProductsValidationError) Field ¶
func (e ProductsValidationError) Field() string
Field function returns field value.
func (ProductsValidationError) Key ¶
func (e ProductsValidationError) Key() bool
Key function returns key value.
func (ProductsValidationError) Reason ¶
func (e ProductsValidationError) Reason() string
Reason function returns reason value.
type PurchaseServiceClient ¶
type PurchaseServiceClient interface { ReserveItem(ctx context.Context, in *ReserveItemRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) CancelReserveItem(ctx context.Context, in *ReserveItemRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetReservation(ctx context.Context, in *GetReservationRequest, opts ...grpc.CallOption) (*Reservation, error) BuyReservation(ctx context.Context, in *BuyReservationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) GetAvailableProductsToReservation(ctx context.Context, in *PharmacyID, opts ...grpc.CallOption) (*Products, error) }
PurchaseServiceClient is the client API for PurchaseService 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 NewPurchaseServiceClient ¶
func NewPurchaseServiceClient(cc grpc.ClientConnInterface) PurchaseServiceClient
type PurchaseServiceServer ¶
type PurchaseServiceServer interface { ReserveItem(context.Context, *ReserveItemRequest) (*emptypb.Empty, error) CancelReserveItem(context.Context, *ReserveItemRequest) (*emptypb.Empty, error) GetReservation(context.Context, *GetReservationRequest) (*Reservation, error) BuyReservation(context.Context, *BuyReservationRequest) (*emptypb.Empty, error) GetAvailableProductsToReservation(context.Context, *PharmacyID) (*Products, error) // contains filtered or unexported methods }
PurchaseServiceServer is the server API for PurchaseService service. All implementations must embed UnimplementedPurchaseServiceServer for forward compatibility
type Reservation ¶
type Reservation struct { Items []*ReservationProductInfo `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` SummaryPrice int64 `protobuf:"varint,2,opt,name=summary_price,json=summaryPrice,proto3" json:"summary_price,omitempty"` // contains filtered or unexported fields }
func (*Reservation) Descriptor
deprecated
func (*Reservation) Descriptor() ([]byte, []int)
Deprecated: Use Reservation.ProtoReflect.Descriptor instead.
func (*Reservation) GetItems ¶
func (x *Reservation) GetItems() []*ReservationProductInfo
func (*Reservation) GetSummaryPrice ¶
func (x *Reservation) GetSummaryPrice() int64
func (*Reservation) ProtoMessage ¶
func (*Reservation) ProtoMessage()
func (*Reservation) ProtoReflect ¶
func (x *Reservation) ProtoReflect() protoreflect.Message
func (*Reservation) Reset ¶
func (x *Reservation) Reset()
func (*Reservation) String ¶
func (x *Reservation) String() string
func (*Reservation) Validate ¶
func (m *Reservation) Validate() error
Validate checks the field values on Reservation with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Reservation) ValidateAll ¶
func (m *Reservation) ValidateAll() error
ValidateAll checks the field values on Reservation with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReservationMultiError, or nil if none found.
type ReservationMultiError ¶
type ReservationMultiError []error
ReservationMultiError is an error wrapping multiple validation errors returned by Reservation.ValidateAll() if the designated constraints aren't met.
func (ReservationMultiError) AllErrors ¶
func (m ReservationMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ReservationMultiError) Error ¶
func (m ReservationMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ReservationProductInfo ¶
type ReservationProductInfo struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Count int64 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` Price int64 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"` // contains filtered or unexported fields }
func (*ReservationProductInfo) Descriptor
deprecated
func (*ReservationProductInfo) Descriptor() ([]byte, []int)
Deprecated: Use ReservationProductInfo.ProtoReflect.Descriptor instead.
func (*ReservationProductInfo) GetCount ¶
func (x *ReservationProductInfo) GetCount() int64
func (*ReservationProductInfo) GetName ¶
func (x *ReservationProductInfo) GetName() string
func (*ReservationProductInfo) GetPrice ¶
func (x *ReservationProductInfo) GetPrice() int64
func (*ReservationProductInfo) ProtoMessage ¶
func (*ReservationProductInfo) ProtoMessage()
func (*ReservationProductInfo) ProtoReflect ¶
func (x *ReservationProductInfo) ProtoReflect() protoreflect.Message
func (*ReservationProductInfo) Reset ¶
func (x *ReservationProductInfo) Reset()
func (*ReservationProductInfo) String ¶
func (x *ReservationProductInfo) String() string
func (*ReservationProductInfo) Validate ¶
func (m *ReservationProductInfo) Validate() error
Validate checks the field values on ReservationProductInfo with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ReservationProductInfo) ValidateAll ¶
func (m *ReservationProductInfo) ValidateAll() error
ValidateAll checks the field values on ReservationProductInfo with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReservationProductInfoMultiError, or nil if none found.
type ReservationProductInfoMultiError ¶
type ReservationProductInfoMultiError []error
ReservationProductInfoMultiError is an error wrapping multiple validation errors returned by ReservationProductInfo.ValidateAll() if the designated constraints aren't met.
func (ReservationProductInfoMultiError) AllErrors ¶
func (m ReservationProductInfoMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ReservationProductInfoMultiError) Error ¶
func (m ReservationProductInfoMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ReservationProductInfoValidationError ¶
type ReservationProductInfoValidationError struct {
// contains filtered or unexported fields
}
ReservationProductInfoValidationError is the validation error returned by ReservationProductInfo.Validate if the designated constraints aren't met.
func (ReservationProductInfoValidationError) Cause ¶
func (e ReservationProductInfoValidationError) Cause() error
Cause function returns cause value.
func (ReservationProductInfoValidationError) Error ¶
func (e ReservationProductInfoValidationError) Error() string
Error satisfies the builtin error interface
func (ReservationProductInfoValidationError) ErrorName ¶
func (e ReservationProductInfoValidationError) ErrorName() string
ErrorName returns error name.
func (ReservationProductInfoValidationError) Field ¶
func (e ReservationProductInfoValidationError) Field() string
Field function returns field value.
func (ReservationProductInfoValidationError) Key ¶
func (e ReservationProductInfoValidationError) Key() bool
Key function returns key value.
func (ReservationProductInfoValidationError) Reason ¶
func (e ReservationProductInfoValidationError) Reason() string
Reason function returns reason value.
type ReservationValidationError ¶
type ReservationValidationError struct {
// contains filtered or unexported fields
}
ReservationValidationError is the validation error returned by Reservation.Validate if the designated constraints aren't met.
func (ReservationValidationError) Cause ¶
func (e ReservationValidationError) Cause() error
Cause function returns cause value.
func (ReservationValidationError) Error ¶
func (e ReservationValidationError) Error() string
Error satisfies the builtin error interface
func (ReservationValidationError) ErrorName ¶
func (e ReservationValidationError) ErrorName() string
ErrorName returns error name.
func (ReservationValidationError) Field ¶
func (e ReservationValidationError) Field() string
Field function returns field value.
func (ReservationValidationError) Key ¶
func (e ReservationValidationError) Key() bool
Key function returns key value.
func (ReservationValidationError) Reason ¶
func (e ReservationValidationError) Reason() string
Reason function returns reason value.
type ReserveItemRequest ¶
type ReserveItemRequest struct { PharmacyId int64 `protobuf:"varint,1,opt,name=pharmacy_id,json=pharmacyId,proto3" json:"pharmacy_id,omitempty"` ItemName string `protobuf:"bytes,2,opt,name=item_name,json=itemName,proto3" json:"item_name,omitempty"` Position string `protobuf:"bytes,3,opt,name=position,proto3" json:"position,omitempty"` PurchaseUuid string `protobuf:"bytes,4,opt,name=purchase_uuid,json=purchaseUuid,proto3" json:"purchase_uuid,omitempty"` // contains filtered or unexported fields }
For error handling use "google.golang.org/grpc/status"
func (*ReserveItemRequest) Descriptor
deprecated
func (*ReserveItemRequest) Descriptor() ([]byte, []int)
Deprecated: Use ReserveItemRequest.ProtoReflect.Descriptor instead.
func (*ReserveItemRequest) GetItemName ¶
func (x *ReserveItemRequest) GetItemName() string
func (*ReserveItemRequest) GetPharmacyId ¶
func (x *ReserveItemRequest) GetPharmacyId() int64
func (*ReserveItemRequest) GetPosition ¶
func (x *ReserveItemRequest) GetPosition() string
func (*ReserveItemRequest) GetPurchaseUuid ¶
func (x *ReserveItemRequest) GetPurchaseUuid() string
func (*ReserveItemRequest) ProtoMessage ¶
func (*ReserveItemRequest) ProtoMessage()
func (*ReserveItemRequest) ProtoReflect ¶
func (x *ReserveItemRequest) ProtoReflect() protoreflect.Message
func (*ReserveItemRequest) Reset ¶
func (x *ReserveItemRequest) Reset()
func (*ReserveItemRequest) String ¶
func (x *ReserveItemRequest) String() string
func (*ReserveItemRequest) Validate ¶
func (m *ReserveItemRequest) Validate() error
Validate checks the field values on ReserveItemRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*ReserveItemRequest) ValidateAll ¶
func (m *ReserveItemRequest) ValidateAll() error
ValidateAll checks the field values on ReserveItemRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReserveItemRequestMultiError, or nil if none found.
type ReserveItemRequestMultiError ¶
type ReserveItemRequestMultiError []error
ReserveItemRequestMultiError is an error wrapping multiple validation errors returned by ReserveItemRequest.ValidateAll() if the designated constraints aren't met.
func (ReserveItemRequestMultiError) AllErrors ¶
func (m ReserveItemRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ReserveItemRequestMultiError) Error ¶
func (m ReserveItemRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ReserveItemRequestValidationError ¶
type ReserveItemRequestValidationError struct {
// contains filtered or unexported fields
}
ReserveItemRequestValidationError is the validation error returned by ReserveItemRequest.Validate if the designated constraints aren't met.
func (ReserveItemRequestValidationError) Cause ¶
func (e ReserveItemRequestValidationError) Cause() error
Cause function returns cause value.
func (ReserveItemRequestValidationError) Error ¶
func (e ReserveItemRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ReserveItemRequestValidationError) ErrorName ¶
func (e ReserveItemRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ReserveItemRequestValidationError) Field ¶
func (e ReserveItemRequestValidationError) Field() string
Field function returns field value.
func (ReserveItemRequestValidationError) Key ¶
func (e ReserveItemRequestValidationError) Key() bool
Key function returns key value.
func (ReserveItemRequestValidationError) Reason ¶
func (e ReserveItemRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedPurchaseServiceServer ¶
type UnimplementedPurchaseServiceServer struct { }
UnimplementedPurchaseServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPurchaseServiceServer) BuyReservation ¶
func (UnimplementedPurchaseServiceServer) BuyReservation(context.Context, *BuyReservationRequest) (*emptypb.Empty, error)
func (UnimplementedPurchaseServiceServer) CancelReserveItem ¶
func (UnimplementedPurchaseServiceServer) CancelReserveItem(context.Context, *ReserveItemRequest) (*emptypb.Empty, error)
func (UnimplementedPurchaseServiceServer) GetAvailableProductsToReservation ¶
func (UnimplementedPurchaseServiceServer) GetAvailableProductsToReservation(context.Context, *PharmacyID) (*Products, error)
func (UnimplementedPurchaseServiceServer) GetReservation ¶
func (UnimplementedPurchaseServiceServer) GetReservation(context.Context, *GetReservationRequest) (*Reservation, error)
func (UnimplementedPurchaseServiceServer) ReserveItem ¶
func (UnimplementedPurchaseServiceServer) ReserveItem(context.Context, *ReserveItemRequest) (*emptypb.Empty, error)
type UnsafePurchaseServiceServer ¶
type UnsafePurchaseServiceServer interface {
// contains filtered or unexported methods
}
UnsafePurchaseServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PurchaseServiceServer will result in compilation errors.