Documentation ¶
Index ¶
- Variables
- func NewHospitalGrpcHandler(p_oGrpcService hospitalService) hospitalGrpcHandler
- func NewHospitalHandler(p_oService hospitalService) hospitalHandler
- func NewHospitalRepository(p_oDatabase *sqlx.DB) hospitalRepository
- func NewHospitalService() hospitalService
- func NewHospitalServiceDB(oRepo Repository) hospitalService
- func RegisterHospitalServiceServer(s grpc.ServiceRegistrar, srv HospitalServiceServer)
- func RouterInit(r fiber.Router)
- func RouterInitGRPC(server *grpc.Server, db *sqlx.DB)
- func RouterInitWithDB(r fiber.Router, dbx *sqlx.DB)
- type ErrorResponse
- type Hospital
- type HospitalAddProto
- func (*HospitalAddProto) Descriptor() ([]byte, []int)deprecated
- func (x *HospitalAddProto) GetAddhospital() *HospitalProto
- func (*HospitalAddProto) ProtoMessage()
- func (x *HospitalAddProto) ProtoReflect() protoreflect.Message
- func (x *HospitalAddProto) Reset()
- func (x *HospitalAddProto) String() string
- type HospitalGetProto
- type HospitalListProto
- func (*HospitalListProto) Descriptor() ([]byte, []int)deprecated
- func (x *HospitalListProto) GetHospitals() []*HospitalProto
- func (*HospitalListProto) ProtoMessage()
- func (x *HospitalListProto) ProtoReflect() protoreflect.Message
- func (x *HospitalListProto) Reset()
- func (x *HospitalListProto) String() string
- type HospitalListResponse
- type HospitalProto
- func (*HospitalProto) Descriptor() ([]byte, []int)deprecated
- func (x *HospitalProto) GetCreateAt() *timestamppb.Timestamp
- func (x *HospitalProto) GetHealthcareId() string
- func (x *HospitalProto) GetHealthcareName() string
- func (x *HospitalProto) GetIsActive() bool
- func (x *HospitalProto) GetUserCreate() string
- func (*HospitalProto) ProtoMessage()
- func (x *HospitalProto) ProtoReflect() protoreflect.Message
- func (x *HospitalProto) Reset()
- func (x *HospitalProto) String() string
- type HospitalRequest
- type HospitalServiceClient
- type HospitalServiceServer
- type Repository
- type UnimplementedHospitalServiceServer
- func (UnimplementedHospitalServiceServer) Add(context.Context, *HospitalAddProto) (*HospitalProto, error)
- func (UnimplementedHospitalServiceServer) Get(context.Context, *HospitalGetProto) (*HospitalProto, error)
- func (UnimplementedHospitalServiceServer) List(context.Context, *emptypb.Empty) (*HospitalListProto, error)
- type UnsafeHospitalServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_domain_hospital_proto_hospital_proto protoreflect.FileDescriptor
var HospitalService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "hospital.HospitalService", HandlerType: (*HospitalServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "List", Handler: _HospitalService_List_Handler, }, { MethodName: "Get", Handler: _HospitalService_Get_Handler, }, { MethodName: "Add", Handler: _HospitalService_Add_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "domain/hospital/proto/hospital.proto", }
HospitalService_ServiceDesc is the grpc.ServiceDesc for HospitalService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func NewHospitalGrpcHandler ¶
func NewHospitalGrpcHandler(p_oGrpcService hospitalService) hospitalGrpcHandler
Declare Hospital GRPC Handler @Param hospitalService
func NewHospitalHandler ¶
func NewHospitalHandler(p_oService hospitalService) hospitalHandler
Declare Hospital Handler @Param appointmentService aka p_oService
func NewHospitalRepository ¶
Declare Hospital Repository
func NewHospitalServiceDB ¶
func NewHospitalServiceDB(oRepo Repository) hospitalService
func RegisterHospitalServiceServer ¶
func RegisterHospitalServiceServer(s grpc.ServiceRegistrar, srv HospitalServiceServer)
func RouterInit ¶
func RouterInit(r fiber.Router)
func RouterInitWithDB ¶
Types ¶
type ErrorResponse ¶
func ValidateStruct ¶
func ValidateStruct(user interface{}) []ErrorResponse
type Hospital ¶
type Hospital struct { HealthcareId string `db:"healthcare_id"` HealthcareName string `db:"healthcare_name"` IsActive bool `db:"is_active"` UserCreate string `db:"user_create"` CreateAt time.Time `db:"create_at"` }
Declare Hospital Entity
type HospitalAddProto ¶
type HospitalAddProto struct { Addhospital *HospitalProto `protobuf:"bytes,1,opt,name=addhospital,proto3" json:"addhospital,omitempty"` // contains filtered or unexported fields }
Add hospital
func (*HospitalAddProto) Descriptor
deprecated
func (*HospitalAddProto) Descriptor() ([]byte, []int)
Deprecated: Use HospitalAddProto.ProtoReflect.Descriptor instead.
func (*HospitalAddProto) GetAddhospital ¶
func (x *HospitalAddProto) GetAddhospital() *HospitalProto
func (*HospitalAddProto) ProtoMessage ¶
func (*HospitalAddProto) ProtoMessage()
func (*HospitalAddProto) ProtoReflect ¶
func (x *HospitalAddProto) ProtoReflect() protoreflect.Message
func (*HospitalAddProto) Reset ¶
func (x *HospitalAddProto) Reset()
func (*HospitalAddProto) String ¶
func (x *HospitalAddProto) String() string
type HospitalGetProto ¶
type HospitalGetProto struct { HealthcareId string `protobuf:"bytes,1,opt,name=healthcare_id,json=healthcareId,proto3" json:"healthcare_id,omitempty"` // contains filtered or unexported fields }
Get Hospital based on Healthcare ID
func (*HospitalGetProto) Descriptor
deprecated
func (*HospitalGetProto) Descriptor() ([]byte, []int)
Deprecated: Use HospitalGetProto.ProtoReflect.Descriptor instead.
func (*HospitalGetProto) GetHealthcareId ¶
func (x *HospitalGetProto) GetHealthcareId() string
func (*HospitalGetProto) ProtoMessage ¶
func (*HospitalGetProto) ProtoMessage()
func (*HospitalGetProto) ProtoReflect ¶
func (x *HospitalGetProto) ProtoReflect() protoreflect.Message
func (*HospitalGetProto) Reset ¶
func (x *HospitalGetProto) Reset()
func (*HospitalGetProto) String ¶
func (x *HospitalGetProto) String() string
type HospitalListProto ¶
type HospitalListProto struct { Hospitals []*HospitalProto `protobuf:"bytes,1,rep,name=hospitals,proto3" json:"hospitals,omitempty"` // contains filtered or unexported fields }
[Response] Get hospital list
func (*HospitalListProto) Descriptor
deprecated
func (*HospitalListProto) Descriptor() ([]byte, []int)
Deprecated: Use HospitalListProto.ProtoReflect.Descriptor instead.
func (*HospitalListProto) GetHospitals ¶
func (x *HospitalListProto) GetHospitals() []*HospitalProto
func (*HospitalListProto) ProtoMessage ¶
func (*HospitalListProto) ProtoMessage()
func (*HospitalListProto) ProtoReflect ¶
func (x *HospitalListProto) ProtoReflect() protoreflect.Message
func (*HospitalListProto) Reset ¶
func (x *HospitalListProto) Reset()
func (*HospitalListProto) String ¶
func (x *HospitalListProto) String() string
type HospitalListResponse ¶
type HospitalListResponse struct { HealthcareId string `json:"HealthcareId"` HealthcareName string `json:"HealthcareName"` IsActive bool `json:"IsActive"` UserCreate string `json:"UserCreate"` CreateAt time.Time `json:"CreateAt"` }
[Response] Declare Hospital List construct
type HospitalProto ¶
type HospitalProto struct { HealthcareId string `protobuf:"bytes,1,opt,name=healthcare_id,json=healthcareId,proto3" json:"healthcare_id,omitempty"` HealthcareName string `protobuf:"bytes,2,opt,name=healthcare_name,json=healthcareName,proto3" json:"healthcare_name,omitempty"` IsActive bool `protobuf:"varint,3,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` UserCreate string `protobuf:"bytes,4,opt,name=user_create,json=userCreate,proto3" json:"user_create,omitempty"` CreateAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=create_at,json=createAt,proto3" json:"create_at,omitempty"` // contains filtered or unexported fields }
[Respon] Get Hospital
func (*HospitalProto) Descriptor
deprecated
func (*HospitalProto) Descriptor() ([]byte, []int)
Deprecated: Use HospitalProto.ProtoReflect.Descriptor instead.
func (*HospitalProto) GetCreateAt ¶
func (x *HospitalProto) GetCreateAt() *timestamppb.Timestamp
func (*HospitalProto) GetHealthcareId ¶
func (x *HospitalProto) GetHealthcareId() string
func (*HospitalProto) GetHealthcareName ¶
func (x *HospitalProto) GetHealthcareName() string
func (*HospitalProto) GetIsActive ¶
func (x *HospitalProto) GetIsActive() bool
func (*HospitalProto) GetUserCreate ¶
func (x *HospitalProto) GetUserCreate() string
func (*HospitalProto) ProtoMessage ¶
func (*HospitalProto) ProtoMessage()
func (*HospitalProto) ProtoReflect ¶
func (x *HospitalProto) ProtoReflect() protoreflect.Message
func (*HospitalProto) Reset ¶
func (x *HospitalProto) Reset()
func (*HospitalProto) String ¶
func (x *HospitalProto) String() string
type HospitalRequest ¶
type HospitalRequest struct { HealthcareId string `json:"HealthcareId"` HealthcareName string `json:"HealthcareName"` IsActive bool `json:"IsActive"` UserCreate string `json:"UserCreate"` CreateAt time.Time `json:"CreateAt"` }
[Request] Declare Hospital List construct
func (HospitalRequest) ParseToEntity ¶
func (a HospitalRequest) ParseToEntity() Hospital
Convert Object to Entity
type HospitalServiceClient ¶
type HospitalServiceClient interface { List(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*HospitalListProto, error) Get(ctx context.Context, in *HospitalGetProto, opts ...grpc.CallOption) (*HospitalProto, error) Add(ctx context.Context, in *HospitalAddProto, opts ...grpc.CallOption) (*HospitalProto, error) }
HospitalServiceClient is the client API for HospitalService 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 NewHospitalServiceClient ¶
func NewHospitalServiceClient(cc grpc.ClientConnInterface) HospitalServiceClient
type HospitalServiceServer ¶
type HospitalServiceServer interface { List(context.Context, *emptypb.Empty) (*HospitalListProto, error) Get(context.Context, *HospitalGetProto) (*HospitalProto, error) Add(context.Context, *HospitalAddProto) (*HospitalProto, error) // contains filtered or unexported methods }
HospitalServiceServer is the server API for HospitalService service. All implementations must embed UnimplementedHospitalServiceServer for forward compatibility
type Repository ¶
type UnimplementedHospitalServiceServer ¶
type UnimplementedHospitalServiceServer struct { }
UnimplementedHospitalServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedHospitalServiceServer) Add ¶
func (UnimplementedHospitalServiceServer) Add(context.Context, *HospitalAddProto) (*HospitalProto, error)
func (UnimplementedHospitalServiceServer) Get ¶
func (UnimplementedHospitalServiceServer) Get(context.Context, *HospitalGetProto) (*HospitalProto, error)
func (UnimplementedHospitalServiceServer) List ¶
func (UnimplementedHospitalServiceServer) List(context.Context, *emptypb.Empty) (*HospitalListProto, error)
type UnsafeHospitalServiceServer ¶
type UnsafeHospitalServiceServer interface {
// contains filtered or unexported methods
}
UnsafeHospitalServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to HospitalServiceServer will result in compilation errors.