schedules

package
v0.0.0-...-e50672f Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_domain_schedules_proto_schedules_dto_proto protoreflect.FileDescriptor
View Source
var Schedule_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "schedules.Schedule",
	HandlerType: (*ScheduleServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSchedule",
			Handler:    _Schedule_CreateSchedule_Handler,
		},
		{
			MethodName: "FindScheduleAll",
			Handler:    _Schedule_FindScheduleAll_Handler,
		},
		{
			MethodName: "FindScheduleAvailable",
			Handler:    _Schedule_FindScheduleAvailable_Handler,
		},
		{
			MethodName: "FindScheduleBooked",
			Handler:    _Schedule_FindScheduleBooked_Handler,
		},
		{
			MethodName: "BookSlot",
			Handler:    _Schedule_BookSlot_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "domain/schedules/proto/schedules_dto.proto",
}

Schedule_ServiceDesc is the grpc.ServiceDesc for Schedule service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func NewRepo

func NewRepo(db *sqlx.DB) scheduleRepo

func NewScheduleHandlerGPRC

func NewScheduleHandlerGPRC(svc service) scheduleHandlerGrpc

func NewService

func NewService(repo repo) service

func RegisterRouteGRPC

func RegisterRouteGRPC(server *grpc.Server, db *sqlx.DB)

func RegisterScheduleServer

func RegisterScheduleServer(s grpc.ServiceRegistrar, srv ScheduleServer)

Types

type FindAll

type FindAll struct {
	HealthcareId string    `json:"healthcare_id" validate:"required"`
	ParamedicId  string    `json:"paramedic_id" validate:"required"`
	Scheduledate time.Time `json:"schedule_date" validate:"required"`
}

type FindAvailable

type FindAvailable struct {
	HealthcareId string    `json:"healthcare_id" validate:"required"`
	ParamedicId  string    `json:"paramedic_id" validate:"required"`
	Scheduledate time.Time `json:"schedule_date" validate:"required"`
}

type FindBooked

type FindBooked struct {
	HealthcareId string    `json:"healthcare_id" validate:"required"`
	ParamedicId  string    `json:"paramedic_id" validate:"required"`
	Scheduledate time.Time `json:"schedule_date" validate:"required"`
}

type FindScheduleProto

type FindScheduleProto struct {
	Healthcareid string                 `protobuf:"bytes,1,opt,name=healthcareid,proto3" json:"healthcareid,omitempty"`
	Paramedicid  string                 `protobuf:"bytes,2,opt,name=paramedicid,proto3" json:"paramedicid,omitempty"`
	Scheduledate *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=scheduledate,proto3" json:"scheduledate,omitempty"`
	// contains filtered or unexported fields
}

func (*FindScheduleProto) Descriptor deprecated

func (*FindScheduleProto) Descriptor() ([]byte, []int)

Deprecated: Use FindScheduleProto.ProtoReflect.Descriptor instead.

func (*FindScheduleProto) GetHealthcareid

func (x *FindScheduleProto) GetHealthcareid() string

func (*FindScheduleProto) GetParamedicid

func (x *FindScheduleProto) GetParamedicid() string

func (*FindScheduleProto) GetScheduledate

func (x *FindScheduleProto) GetScheduledate() *timestamppb.Timestamp

func (*FindScheduleProto) ProtoMessage

func (*FindScheduleProto) ProtoMessage()

func (*FindScheduleProto) ProtoReflect

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

func (*FindScheduleProto) Reset

func (x *FindScheduleProto) Reset()

func (*FindScheduleProto) String

func (x *FindScheduleProto) String() string

type ListscheduledetailProto

type ListscheduledetailProto struct {
	Schedules []*ScheduledetailProto `protobuf:"bytes,1,rep,name=schedules,proto3" json:"schedules,omitempty"`
	// contains filtered or unexported fields
}

func (*ListscheduledetailProto) Descriptor deprecated

func (*ListscheduledetailProto) Descriptor() ([]byte, []int)

Deprecated: Use ListscheduledetailProto.ProtoReflect.Descriptor instead.

func (*ListscheduledetailProto) GetSchedules

func (x *ListscheduledetailProto) GetSchedules() []*ScheduledetailProto

func (*ListscheduledetailProto) ProtoMessage

func (*ListscheduledetailProto) ProtoMessage()

func (*ListscheduledetailProto) ProtoReflect

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

func (*ListscheduledetailProto) Reset

func (x *ListscheduledetailProto) Reset()

func (*ListscheduledetailProto) String

func (x *ListscheduledetailProto) String() string

type ScheduleClient

type ScheduleClient interface {
	CreateSchedule(ctx context.Context, in *ScheduleCreateProto, opts ...grpc.CallOption) (*ScheduleProto, error)
	FindScheduleAll(ctx context.Context, in *FindScheduleProto, opts ...grpc.CallOption) (*ListscheduledetailProto, error)
	FindScheduleAvailable(ctx context.Context, in *FindScheduleProto, opts ...grpc.CallOption) (*ListscheduledetailProto, error)
	FindScheduleBooked(ctx context.Context, in *FindScheduleProto, opts ...grpc.CallOption) (*ListscheduledetailProto, error)
	BookSlot(ctx context.Context, in *SetScheduleProto, opts ...grpc.CallOption) (*ScheduledetailProto, error)
}

ScheduleClient is the client API for Schedule 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 NewScheduleClient

func NewScheduleClient(cc grpc.ClientConnInterface) ScheduleClient

type ScheduleCreateProto

type ScheduleCreateProto struct {
	Healthcareid  string                 `protobuf:"bytes,1,opt,name=healthcareid,proto3" json:"healthcareid,omitempty"`
	Paramedicid   string                 `protobuf:"bytes,2,opt,name=paramedicid,proto3" json:"paramedicid,omitempty"`
	Schedulestart *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=schedulestart,proto3" json:"schedulestart,omitempty"`
	Scheduleend   *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=scheduleend,proto3" json:"scheduleend,omitempty"`
	Duration      int32                  `protobuf:"varint,5,opt,name=duration,proto3" json:"duration,omitempty"`
	Usercreate    string                 `protobuf:"bytes,6,opt,name=usercreate,proto3" json:"usercreate,omitempty"`
	// contains filtered or unexported fields
}

func (*ScheduleCreateProto) Descriptor deprecated

func (*ScheduleCreateProto) Descriptor() ([]byte, []int)

Deprecated: Use ScheduleCreateProto.ProtoReflect.Descriptor instead.

func (*ScheduleCreateProto) GetDuration

func (x *ScheduleCreateProto) GetDuration() int32

func (*ScheduleCreateProto) GetHealthcareid

func (x *ScheduleCreateProto) GetHealthcareid() string

func (*ScheduleCreateProto) GetParamedicid

func (x *ScheduleCreateProto) GetParamedicid() string

func (*ScheduleCreateProto) GetScheduleend

func (x *ScheduleCreateProto) GetScheduleend() *timestamppb.Timestamp

func (*ScheduleCreateProto) GetSchedulestart

func (x *ScheduleCreateProto) GetSchedulestart() *timestamppb.Timestamp

func (*ScheduleCreateProto) GetUsercreate

func (x *ScheduleCreateProto) GetUsercreate() string

func (*ScheduleCreateProto) ProtoMessage

func (*ScheduleCreateProto) ProtoMessage()

func (*ScheduleCreateProto) ProtoReflect

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

func (*ScheduleCreateProto) Reset

func (x *ScheduleCreateProto) Reset()

func (*ScheduleCreateProto) String

func (x *ScheduleCreateProto) String() string

type ScheduleProto

type ScheduleProto struct {
	Scheduleid    string `protobuf:"bytes,1,opt,name=scheduleid,proto3" json:"scheduleid,omitempty"`
	Healthcareid  string `protobuf:"bytes,2,opt,name=healthcareid,proto3" json:"healthcareid,omitempty"`
	Paramedicid   string `protobuf:"bytes,3,opt,name=paramedicid,proto3" json:"paramedicid,omitempty"`
	Schedulestart string `protobuf:"bytes,4,opt,name=schedulestart,proto3" json:"schedulestart,omitempty"`
	Scheduleend   string `protobuf:"bytes,5,opt,name=scheduleend,proto3" json:"scheduleend,omitempty"`
	Duration      int32  `protobuf:"varint,6,opt,name=duration,proto3" json:"duration,omitempty"`
	// contains filtered or unexported fields
}

func (*ScheduleProto) Descriptor deprecated

func (*ScheduleProto) Descriptor() ([]byte, []int)

Deprecated: Use ScheduleProto.ProtoReflect.Descriptor instead.

func (*ScheduleProto) GetDuration

func (x *ScheduleProto) GetDuration() int32

func (*ScheduleProto) GetHealthcareid

func (x *ScheduleProto) GetHealthcareid() string

func (*ScheduleProto) GetParamedicid

func (x *ScheduleProto) GetParamedicid() string

func (*ScheduleProto) GetScheduleend

func (x *ScheduleProto) GetScheduleend() string

func (*ScheduleProto) GetScheduleid

func (x *ScheduleProto) GetScheduleid() string

func (*ScheduleProto) GetSchedulestart

func (x *ScheduleProto) GetSchedulestart() string

func (*ScheduleProto) ProtoMessage

func (*ScheduleProto) ProtoMessage()

func (*ScheduleProto) ProtoReflect

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

func (*ScheduleProto) Reset

func (x *ScheduleProto) Reset()

func (*ScheduleProto) String

func (x *ScheduleProto) String() string

type ScheduleServer

type ScheduleServer interface {
	CreateSchedule(context.Context, *ScheduleCreateProto) (*ScheduleProto, error)
	FindScheduleAll(context.Context, *FindScheduleProto) (*ListscheduledetailProto, error)
	FindScheduleAvailable(context.Context, *FindScheduleProto) (*ListscheduledetailProto, error)
	FindScheduleBooked(context.Context, *FindScheduleProto) (*ListscheduledetailProto, error)
	BookSlot(context.Context, *SetScheduleProto) (*ScheduledetailProto, error)
	// contains filtered or unexported methods
}

ScheduleServer is the server API for Schedule service. All implementations must embed UnimplementedScheduleServer for forward compatibility

type ScheduledetailProto

type ScheduledetailProto struct {
	Scheduleslotid int32                  `protobuf:"varint,1,opt,name=scheduleslotid,proto3" json:"scheduleslotid,omitempty"`
	Slottime       *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=slottime,proto3" json:"slottime,omitempty"`
	Isbooked       bool                   `protobuf:"varint,3,opt,name=isbooked,proto3" json:"isbooked,omitempty"`
	// contains filtered or unexported fields
}

func (*ScheduledetailProto) Descriptor deprecated

func (*ScheduledetailProto) Descriptor() ([]byte, []int)

Deprecated: Use ScheduledetailProto.ProtoReflect.Descriptor instead.

func (*ScheduledetailProto) GetIsbooked

func (x *ScheduledetailProto) GetIsbooked() bool

func (*ScheduledetailProto) GetScheduleslotid

func (x *ScheduledetailProto) GetScheduleslotid() int32

func (*ScheduledetailProto) GetSlottime

func (x *ScheduledetailProto) GetSlottime() *timestamppb.Timestamp

func (*ScheduledetailProto) ProtoMessage

func (*ScheduledetailProto) ProtoMessage()

func (*ScheduledetailProto) ProtoReflect

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

func (*ScheduledetailProto) Reset

func (x *ScheduledetailProto) Reset()

func (*ScheduledetailProto) String

func (x *ScheduledetailProto) String() string

type SetScheduleProto

type SetScheduleProto struct {
	Scheduleslotid int32 `protobuf:"varint,1,opt,name=scheduleslotid,proto3" json:"scheduleslotid,omitempty"`
	// contains filtered or unexported fields
}

func (*SetScheduleProto) Descriptor deprecated

func (*SetScheduleProto) Descriptor() ([]byte, []int)

Deprecated: Use SetScheduleProto.ProtoReflect.Descriptor instead.

func (*SetScheduleProto) GetScheduleslotid

func (x *SetScheduleProto) GetScheduleslotid() int32

func (*SetScheduleProto) ProtoMessage

func (*SetScheduleProto) ProtoMessage()

func (*SetScheduleProto) ProtoReflect

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

func (*SetScheduleProto) Reset

func (x *SetScheduleProto) Reset()

func (*SetScheduleProto) String

func (x *SetScheduleProto) String() string

type UnimplementedScheduleServer

type UnimplementedScheduleServer struct {
}

UnimplementedScheduleServer must be embedded to have forward compatible implementations.

func (UnimplementedScheduleServer) BookSlot

func (UnimplementedScheduleServer) CreateSchedule

func (UnimplementedScheduleServer) FindScheduleAll

func (UnimplementedScheduleServer) FindScheduleAvailable

func (UnimplementedScheduleServer) FindScheduleBooked

type UnsafeScheduleServer

type UnsafeScheduleServer interface {
	// contains filtered or unexported methods
}

UnsafeScheduleServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ScheduleServer will result in compilation errors.

Jump to

Keyboard shortcuts

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