pharmacyproto

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_pharmacy_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Address.ProtoReflect.Descriptor instead.

func (*Address) GetCity

func (x *Address) GetCity() string

func (*Address) GetHouse

func (x *Address) GetHouse() string

func (*Address) GetStreet

func (x *Address) GetStreet() string

func (*Address) ProtoMessage

func (*Address) ProtoMessage()

func (*Address) ProtoReflect

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

func (*Address) Reset

func (x *Address) Reset()

func (*Address) String

func (x *Address) String() string

func (*Address) Validate

func (m *Address) Validate() error

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

func (m *Address) ValidateAll() error

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

Cause function returns cause value.

func (NewPharmacyValidationError) Error

Error satisfies the builtin error interface

func (NewPharmacyValidationError) ErrorName

func (e NewPharmacyValidationError) ErrorName() string

ErrorName returns error name.

func (NewPharmacyValidationError) Field

Field function returns field value.

func (NewPharmacyValidationError) Key

Key function returns key value.

func (NewPharmacyValidationError) Reason

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

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

Cause function returns cause value.

func (PaginationRequestValidationError) Error

Error satisfies the builtin error interface

func (PaginationRequestValidationError) ErrorName

ErrorName returns error name.

func (PaginationRequestValidationError) Field

Field function returns field value.

func (PaginationRequestValidationError) Key

Key function returns key value.

func (PaginationRequestValidationError) Reason

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

Error satisfies the builtin error interface

func (PharmaciesValidationError) ErrorName

func (e PharmaciesValidationError) ErrorName() string

ErrorName returns error name.

func (PharmaciesValidationError) Field

Field function returns field value.

func (PharmaciesValidationError) Key

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

Deprecated: Use Pharmacy.ProtoReflect.Descriptor instead.

func (*Pharmacy) GetAddress

func (x *Pharmacy) GetAddress() *Address

func (*Pharmacy) GetId

func (x *Pharmacy) GetId() int64

func (*Pharmacy) GetName

func (x *Pharmacy) GetName() string

func (*Pharmacy) ProtoMessage

func (*Pharmacy) ProtoMessage()

func (*Pharmacy) ProtoReflect

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

func (*Pharmacy) Reset

func (x *Pharmacy) Reset()

func (*Pharmacy) String

func (x *Pharmacy) String() string

func (*Pharmacy) Validate

func (m *Pharmacy) Validate() error

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

func (m *Pharmacy) ValidateAll() error

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.

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

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.

Jump to

Keyboard shortcuts

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