Documentation ¶
Index ¶
- Variables
- func RegisterPharmacyServiceServer(s grpc.ServiceRegistrar, srv PharmacyServiceServer)
- type Address
- func (*Address) Descriptor() ([]byte, []int)deprecated
- func (x *Address) GetCity() string
- func (x *Address) GetHouse() string
- func (x *Address) GetStreet() string
- func (*Address) ProtoMessage()
- func (x *Address) ProtoReflect() protoreflect.Message
- func (x *Address) Reset()
- func (x *Address) String() string
- func (m *Address) Validate() error
- func (m *Address) ValidateAll() error
- type AddressMultiError
- type AddressValidationError
- type NewPharmacy
- func (*NewPharmacy) Descriptor() ([]byte, []int)deprecated
- func (x *NewPharmacy) GetAddress() *Address
- func (x *NewPharmacy) GetName() string
- func (*NewPharmacy) ProtoMessage()
- func (x *NewPharmacy) ProtoReflect() protoreflect.Message
- func (x *NewPharmacy) Reset()
- func (x *NewPharmacy) String() string
- func (m *NewPharmacy) Validate() error
- func (m *NewPharmacy) ValidateAll() error
- type NewPharmacyMultiError
- type NewPharmacyValidationError
- func (e NewPharmacyValidationError) Cause() error
- func (e NewPharmacyValidationError) Error() string
- func (e NewPharmacyValidationError) ErrorName() string
- func (e NewPharmacyValidationError) Field() string
- func (e NewPharmacyValidationError) Key() bool
- func (e NewPharmacyValidationError) 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 Pharmacies
- func (*Pharmacies) Descriptor() ([]byte, []int)deprecated
- func (x *Pharmacies) GetPharmacies() []*Pharmacy
- func (*Pharmacies) ProtoMessage()
- func (x *Pharmacies) ProtoReflect() protoreflect.Message
- func (x *Pharmacies) Reset()
- func (x *Pharmacies) String() string
- func (m *Pharmacies) Validate() error
- func (m *Pharmacies) ValidateAll() error
- type PharmaciesMultiError
- type PharmaciesValidationError
- type Pharmacy
- func (*Pharmacy) Descriptor() ([]byte, []int)deprecated
- func (x *Pharmacy) GetAddress() *Address
- func (x *Pharmacy) GetId() int64
- func (x *Pharmacy) GetName() string
- func (*Pharmacy) ProtoMessage()
- func (x *Pharmacy) ProtoReflect() protoreflect.Message
- func (x *Pharmacy) Reset()
- func (x *Pharmacy) String() string
- func (m *Pharmacy) Validate() error
- func (m *Pharmacy) ValidateAll() error
- type PharmacyMultiError
- type PharmacyServiceClient
- type PharmacyServiceServer
- type PharmacyValidationError
- type UnimplementedPharmacyServiceServer
- type UnsafePharmacyServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_pharmacy_proto protoreflect.FileDescriptor
var PharmacyService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "pharmacyService.PharmacyService", HandlerType: (*PharmacyServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreatePharmacy", Handler: _PharmacyService_CreatePharmacy_Handler, }, { MethodName: "GetPharmacies", Handler: _PharmacyService_GetPharmacies_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "pharmacy.proto", }
PharmacyService_ServiceDesc is the grpc.ServiceDesc for PharmacyService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPharmacyServiceServer ¶
func RegisterPharmacyServiceServer(s grpc.ServiceRegistrar, srv PharmacyServiceServer)
Types ¶
type Address ¶
type Address struct { City string `protobuf:"bytes,1,opt,name=city,proto3" json:"city,omitempty"` Street string `protobuf:"bytes,2,opt,name=street,proto3" json:"street,omitempty"` House string `protobuf:"bytes,3,opt,name=house,proto3" json:"house,omitempty"` // contains filtered or unexported fields }
func (*Address) Descriptor
deprecated
func (*Address) ProtoMessage ¶
func (*Address) ProtoMessage()
func (*Address) ProtoReflect ¶
func (x *Address) ProtoReflect() protoreflect.Message
func (*Address) Validate ¶
Validate checks the field values on Address 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 (*Address) ValidateAll ¶
ValidateAll checks the field values on Address 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 AddressMultiError, or nil if none found.
type AddressMultiError ¶
type AddressMultiError []error
AddressMultiError is an error wrapping multiple validation errors returned by Address.ValidateAll() if the designated constraints aren't met.
func (AddressMultiError) AllErrors ¶
func (m AddressMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AddressMultiError) Error ¶
func (m AddressMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AddressValidationError ¶
type AddressValidationError struct {
// contains filtered or unexported fields
}
AddressValidationError is the validation error returned by Address.Validate if the designated constraints aren't met.
func (AddressValidationError) Cause ¶
func (e AddressValidationError) Cause() error
Cause function returns cause value.
func (AddressValidationError) Error ¶
func (e AddressValidationError) Error() string
Error satisfies the builtin error interface
func (AddressValidationError) ErrorName ¶
func (e AddressValidationError) ErrorName() string
ErrorName returns error name.
func (AddressValidationError) Field ¶
func (e AddressValidationError) Field() string
Field function returns field value.
func (AddressValidationError) Key ¶
func (e AddressValidationError) Key() bool
Key function returns key value.
func (AddressValidationError) Reason ¶
func (e AddressValidationError) Reason() string
Reason function returns reason value.
type NewPharmacy ¶
type NewPharmacy struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Address *Address `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*NewPharmacy) Descriptor
deprecated
func (*NewPharmacy) Descriptor() ([]byte, []int)
Deprecated: Use NewPharmacy.ProtoReflect.Descriptor instead.
func (*NewPharmacy) GetAddress ¶
func (x *NewPharmacy) GetAddress() *Address
func (*NewPharmacy) GetName ¶
func (x *NewPharmacy) GetName() string
func (*NewPharmacy) ProtoMessage ¶
func (*NewPharmacy) ProtoMessage()
func (*NewPharmacy) ProtoReflect ¶
func (x *NewPharmacy) ProtoReflect() protoreflect.Message
func (*NewPharmacy) Reset ¶
func (x *NewPharmacy) Reset()
func (*NewPharmacy) String ¶
func (x *NewPharmacy) String() string
func (*NewPharmacy) Validate ¶
func (m *NewPharmacy) Validate() error
Validate checks the field values on NewPharmacy 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 (*NewPharmacy) ValidateAll ¶
func (m *NewPharmacy) ValidateAll() error
ValidateAll checks the field values on NewPharmacy 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 NewPharmacyMultiError, or nil if none found.
type NewPharmacyMultiError ¶
type NewPharmacyMultiError []error
NewPharmacyMultiError is an error wrapping multiple validation errors returned by NewPharmacy.ValidateAll() if the designated constraints aren't met.
func (NewPharmacyMultiError) AllErrors ¶
func (m NewPharmacyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (NewPharmacyMultiError) Error ¶
func (m NewPharmacyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type NewPharmacyValidationError ¶
type NewPharmacyValidationError struct {
// contains filtered or unexported fields
}
NewPharmacyValidationError is the validation error returned by NewPharmacy.Validate if the designated constraints aren't met.
func (NewPharmacyValidationError) Cause ¶
func (e NewPharmacyValidationError) Cause() error
Cause function returns cause value.
func (NewPharmacyValidationError) Error ¶
func (e NewPharmacyValidationError) Error() string
Error satisfies the builtin error interface
func (NewPharmacyValidationError) ErrorName ¶
func (e NewPharmacyValidationError) ErrorName() string
ErrorName returns error name.
func (NewPharmacyValidationError) Field ¶
func (e NewPharmacyValidationError) Field() string
Field function returns field value.
func (NewPharmacyValidationError) Key ¶
func (e NewPharmacyValidationError) Key() bool
Key function returns key value.
func (NewPharmacyValidationError) Reason ¶
func (e NewPharmacyValidationError) 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 Pharmacies ¶
type Pharmacies struct { Pharmacies []*Pharmacy `protobuf:"bytes,1,rep,name=pharmacies,proto3" json:"pharmacies,omitempty"` // contains filtered or unexported fields }
func (*Pharmacies) Descriptor
deprecated
func (*Pharmacies) Descriptor() ([]byte, []int)
Deprecated: Use Pharmacies.ProtoReflect.Descriptor instead.
func (*Pharmacies) GetPharmacies ¶
func (x *Pharmacies) GetPharmacies() []*Pharmacy
func (*Pharmacies) ProtoMessage ¶
func (*Pharmacies) ProtoMessage()
func (*Pharmacies) ProtoReflect ¶
func (x *Pharmacies) ProtoReflect() protoreflect.Message
func (*Pharmacies) Reset ¶
func (x *Pharmacies) Reset()
func (*Pharmacies) String ¶
func (x *Pharmacies) String() string
func (*Pharmacies) Validate ¶
func (m *Pharmacies) Validate() error
Validate checks the field values on Pharmacies 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 (*Pharmacies) ValidateAll ¶
func (m *Pharmacies) ValidateAll() error
ValidateAll checks the field values on Pharmacies 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 PharmaciesMultiError, or nil if none found.
type PharmaciesMultiError ¶
type PharmaciesMultiError []error
PharmaciesMultiError is an error wrapping multiple validation errors returned by Pharmacies.ValidateAll() if the designated constraints aren't met.
func (PharmaciesMultiError) AllErrors ¶
func (m PharmaciesMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PharmaciesMultiError) Error ¶
func (m PharmaciesMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PharmaciesValidationError ¶
type PharmaciesValidationError struct {
// contains filtered or unexported fields
}
PharmaciesValidationError is the validation error returned by Pharmacies.Validate if the designated constraints aren't met.
func (PharmaciesValidationError) Cause ¶
func (e PharmaciesValidationError) Cause() error
Cause function returns cause value.
func (PharmaciesValidationError) Error ¶
func (e PharmaciesValidationError) Error() string
Error satisfies the builtin error interface
func (PharmaciesValidationError) ErrorName ¶
func (e PharmaciesValidationError) ErrorName() string
ErrorName returns error name.
func (PharmaciesValidationError) Field ¶
func (e PharmaciesValidationError) Field() string
Field function returns field value.
func (PharmaciesValidationError) Key ¶
func (e PharmaciesValidationError) Key() bool
Key function returns key value.
func (PharmaciesValidationError) Reason ¶
func (e PharmaciesValidationError) Reason() string
Reason function returns reason value.
type Pharmacy ¶
type Pharmacy struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Address *Address `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` // contains filtered or unexported fields }
func (*Pharmacy) Descriptor
deprecated
func (*Pharmacy) GetAddress ¶
func (*Pharmacy) ProtoMessage ¶
func (*Pharmacy) ProtoMessage()
func (*Pharmacy) ProtoReflect ¶
func (x *Pharmacy) ProtoReflect() protoreflect.Message
func (*Pharmacy) Validate ¶
Validate checks the field values on Pharmacy 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 (*Pharmacy) ValidateAll ¶
ValidateAll checks the field values on Pharmacy 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 PharmacyMultiError, or nil if none found.
type PharmacyMultiError ¶
type PharmacyMultiError []error
PharmacyMultiError is an error wrapping multiple validation errors returned by Pharmacy.ValidateAll() if the designated constraints aren't met.
func (PharmacyMultiError) AllErrors ¶
func (m PharmacyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (PharmacyMultiError) Error ¶
func (m PharmacyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type PharmacyServiceClient ¶
type PharmacyServiceClient interface { CreatePharmacy(ctx context.Context, in *NewPharmacy, opts ...grpc.CallOption) (*emptypb.Empty, error) GetPharmacies(ctx context.Context, in *PaginationRequest, opts ...grpc.CallOption) (*Pharmacies, error) }
PharmacyServiceClient is the client API for PharmacyService 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 NewPharmacyServiceClient ¶
func NewPharmacyServiceClient(cc grpc.ClientConnInterface) PharmacyServiceClient
type PharmacyServiceServer ¶
type PharmacyServiceServer interface { CreatePharmacy(context.Context, *NewPharmacy) (*emptypb.Empty, error) GetPharmacies(context.Context, *PaginationRequest) (*Pharmacies, error) // contains filtered or unexported methods }
PharmacyServiceServer is the server API for PharmacyService service. All implementations must embed UnimplementedPharmacyServiceServer for forward compatibility
type PharmacyValidationError ¶
type PharmacyValidationError struct {
// contains filtered or unexported fields
}
PharmacyValidationError is the validation error returned by Pharmacy.Validate if the designated constraints aren't met.
func (PharmacyValidationError) Cause ¶
func (e PharmacyValidationError) Cause() error
Cause function returns cause value.
func (PharmacyValidationError) Error ¶
func (e PharmacyValidationError) Error() string
Error satisfies the builtin error interface
func (PharmacyValidationError) ErrorName ¶
func (e PharmacyValidationError) ErrorName() string
ErrorName returns error name.
func (PharmacyValidationError) Field ¶
func (e PharmacyValidationError) Field() string
Field function returns field value.
func (PharmacyValidationError) Key ¶
func (e PharmacyValidationError) Key() bool
Key function returns key value.
func (PharmacyValidationError) Reason ¶
func (e PharmacyValidationError) Reason() string
Reason function returns reason value.
type UnimplementedPharmacyServiceServer ¶
type UnimplementedPharmacyServiceServer struct { }
UnimplementedPharmacyServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedPharmacyServiceServer) CreatePharmacy ¶
func (UnimplementedPharmacyServiceServer) CreatePharmacy(context.Context, *NewPharmacy) (*emptypb.Empty, error)
func (UnimplementedPharmacyServiceServer) GetPharmacies ¶
func (UnimplementedPharmacyServiceServer) GetPharmacies(context.Context, *PaginationRequest) (*Pharmacies, error)
type UnsafePharmacyServiceServer ¶
type UnsafePharmacyServiceServer interface {
// contains filtered or unexported methods
}
UnsafePharmacyServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PharmacyServiceServer will result in compilation errors.