Documentation ¶
Index ¶
- type CreateSpaceRequest
- type ISpaceUseCase
- type JoinSpaceRequest
- type SpaceByIdRequest
- type SpaceHandler
- func (sh *SpaceHandler) CreateSpace(ctx context.Context, req *CreateSpaceRequest) (*SpaceResponse, error)
- func (sh *SpaceHandler) DeleteSpace(ctx context.Context, req *SpaceByIdRequest) (*struct{}, error)
- func (sh *SpaceHandler) GetSpace(ctx context.Context, req *SpaceByIdRequest) (*SpaceResponse, error)
- func (sh *SpaceHandler) JoinSpace(ctx context.Context, req *JoinSpaceRequest) (*struct{}, error)
- func (sh *SpaceHandler) UpdateSpace(ctx context.Context, req *UpdateSpaceRequest) (*SpaceResponse, error)
- type SpaceResponse
- type UpdateSpaceRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateSpaceRequest ¶
type CreateSpaceRequest struct { Body struct { UserId int `json:"userId" example:"123" doc:"User ID"` Name string `json:"name" example:"MAI" doc:"Space Name"` Description string `json:"description" example:"university" doc:"Space description"` Tags entity.Tags `json:"tags" doc:"Tags options for this space"` } }
type ISpaceUseCase ¶
type ISpaceUseCase interface { CreateSpace(ctx context.Context, cmd commands.CreateSpaceCommand) (*entity.Space, error) GetSpace(ctx context.Context, cmd commands.SpaceByIdCommand) (*entity.Space, error) JoinSpace(ctx context.Context, cmd commands.JoinSpaceCommand) error UpdateSpace(ctx context.Context, cmd commands.UpdateSpaceCommand) (*entity.Space, error) DeleteSpace(ctx context.Context, cmd commands.SpaceByIdCommand) error }
type JoinSpaceRequest ¶
type SpaceByIdRequest ¶
type SpaceByIdRequest struct {
ID int `path:"id" maxLength:"30" example:"1" doc:"space id"`
}
type SpaceHandler ¶
type SpaceHandler struct {
// contains filtered or unexported fields
}
func NewSpaceHandler ¶
func NewSpaceHandler(uc ISpaceUseCase) *SpaceHandler
func (*SpaceHandler) CreateSpace ¶
func (sh *SpaceHandler) CreateSpace(ctx context.Context, req *CreateSpaceRequest) (*SpaceResponse, error)
func (*SpaceHandler) DeleteSpace ¶
func (sh *SpaceHandler) DeleteSpace(ctx context.Context, req *SpaceByIdRequest) (*struct{}, error)
func (*SpaceHandler) GetSpace ¶
func (sh *SpaceHandler) GetSpace(ctx context.Context, req *SpaceByIdRequest) (*SpaceResponse, error)
func (*SpaceHandler) JoinSpace ¶
func (sh *SpaceHandler) JoinSpace(ctx context.Context, req *JoinSpaceRequest) (*struct{}, error)
func (*SpaceHandler) UpdateSpace ¶
func (sh *SpaceHandler) UpdateSpace(ctx context.Context, req *UpdateSpaceRequest) (*SpaceResponse, error)
type SpaceResponse ¶
func ToSpaceOutputFromEntity ¶
func ToSpaceOutputFromEntity(space *entity.Space) *SpaceResponse
Converters
type UpdateSpaceRequest ¶
Click to show internal directories.
Click to hide internal directories.