Documentation
¶
Index ¶
- type CreateEventRequest
- type EventByIdRequest
- type EventHandler
- func (eh *EventHandler) CreateEvent(ctx context.Context, req *CreateEventRequest) (*EventResponse, error)
- func (eh *EventHandler) DeleteEvent(ctx context.Context, req *EventByIdRequest) (*struct{}, error)
- func (eh *EventHandler) GetEvent(ctx context.Context, req *EventByIdRequest) (*EventResponse, error)
- func (eh *EventHandler) JoinEvent(ctx context.Context, req *JoinEventRequest) (*struct{}, error)
- type EventResponse
- type IEventUseCase
- type JoinEventRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateEventRequest ¶
type CreateEventRequest struct {
Body struct {
SpaceId int `json:"spaceId" example:"123" doc:"Space ID"`
UserId int `json:"userId" example:"123" doc:"Event ID"`
EventInfo struct {
Name string `json:"name" example:"fun event" doc:"Event name"`
Description string `json:"description" example:"enormously fun event" doc:"Event description"`
BeginDate time.Time `json:"beginDate" example:"2007-03-01T13:00:00" doc:"Event start date and time"`
EndDate time.Time `json:"endDate" example:"2007-03-01T13:00:00" doc:"Event end date and time"`
Tags entity.Tags `json:"tags" doc:"Tags for this event"`
}
}
}
type EventByIdRequest ¶
type EventByIdRequest struct {
ID int `path:"id" json:"id" maxLength:"30" example:"1" doc:"event id"`
}
type EventHandler ¶
type EventHandler struct {
// contains filtered or unexported fields
}
func NewEventHandler ¶
func NewEventHandler(uc IEventUseCase) *EventHandler
func (*EventHandler) CreateEvent ¶
func (eh *EventHandler) CreateEvent(ctx context.Context, req *CreateEventRequest) (*EventResponse, error)
func (*EventHandler) DeleteEvent ¶
func (eh *EventHandler) DeleteEvent(ctx context.Context, req *EventByIdRequest) (*struct{}, error)
func (*EventHandler) GetEvent ¶
func (eh *EventHandler) GetEvent(ctx context.Context, req *EventByIdRequest) (*EventResponse, error)
func (*EventHandler) JoinEvent ¶
func (eh *EventHandler) JoinEvent(ctx context.Context, req *JoinEventRequest) (*struct{}, error)
type EventResponse ¶
func ToEventOutputFromEntity ¶
func ToEventOutputFromEntity(event *entity.Event) *EventResponse
Converters
type IEventUseCase ¶
type IEventUseCase interface {
CreateEvent(ctx context.Context, cmd commands.CreateEventCommand) (*entity.Event, error)
GetEvent(ctx context.Context, cmd commands.EventByIdCommand) (*entity.Event, error)
JoinEvent(ctx context.Context, cmd commands.JoinEventCommand) error
DeleteEvent(ctx context.Context, cmd commands.EventByIdCommand) error
}
type JoinEventRequest ¶
Click to show internal directories.
Click to hide internal directories.