Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRelationshipHandler ¶
func NewRelationshipHandler(routerGroup *gin.Engine, us domain.RelationshipUseCase)
Types ¶
type RelationshipHandler ¶
type RelationshipHandler struct {
RUseCase domain.RelationshipUseCase
}
func (*RelationshipHandler) CreateRelationship ¶
func (h *RelationshipHandler) CreateRelationship(c *gin.Context)
CreateRelationship godoc @Summary Route to create relationships @Description Create relationships @Tags Relationship @Accept json @Produce json @Param personId path int true "Person ID" @Param Payload body domain.Relationship true "Payload" @Success 201 {object} string @Failure 400 {object} domain.ErrorResponse @Failure 422 {object} domain.ErrorResponse @Router /v1/relationships/{personId} [POST]
func (*RelationshipHandler) DeleteRelationship ¶
func (h *RelationshipHandler) DeleteRelationship(c *gin.Context)
DeleteRelationship godoc @Summary Route to delete relationships @Description Delete all relationships from person (parent and children) @Tags Relationship @Accept json @Produce json @Param personId path int true "Person ID" @Success 204 {string} string @Failure 400 {object} domain.ErrorResponse @Failure 422 {object} domain.ErrorResponse @Router /v1/relationships/{personId} [DELETE]
func (*RelationshipHandler) GetRelationshipByID ¶
func (h *RelationshipHandler) GetRelationshipByID(c *gin.Context)
GetRelationshipByID godoc @Summary Route to Get relationships @Description Get relationships @Tags Relationship @Accept json @Produce json @Param personId path int true "Person ID" @Success 200 {object} domain.Member @Failure 400 {object} domain.ErrorResponse @Router /v1/relationships/{personId} [GET]