Documentation ¶
Index ¶
- type Repos
- func (r *Repos) DeleteCrew(c echo.Context) error
- func (r *Repos) DeleteEvent(c echo.Context) error
- func (r *Repos) DeletePosition(c echo.Context) error
- func (r *Repos) DeleteSignup(c echo.Context) error
- func (r *Repos) GetEvent(c echo.Context) error
- func (r *Repos) ListMonth(c echo.Context) error
- func (r *Repos) ListPosition(c echo.Context) error
- func (r *Repos) NewCrew(c echo.Context) error
- func (r *Repos) NewEvent(c echo.Context) error
- func (r *Repos) NewPosition(c echo.Context) error
- func (r *Repos) NewSignup(c echo.Context) error
- func (r *Repos) ResetCrew(c echo.Context) error
- func (r *Repos) SetCrew(c echo.Context) error
- func (r *Repos) UpdateEvent(c echo.Context) error
- func (r *Repos) UpdatePosition(c echo.Context) error
- func (r *Repos) UpdateSignup(c echo.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repos ¶
type Repos struct {
// contains filtered or unexported fields
}
Repos encapsulates the dependency
func (*Repos) DeleteCrew ¶
DeleteCrew handles deleting crew position
@Summary Delete crew @Description deletes a crew position by ID. @ID delete-crew @Tags clapper-crews @Param signupid path int true "Event ID" @Param signupid path int true "Signup ID" @Param signupid path int true "Crew ID" @Success 200 @Router /v1/internal/clapper/{eventid}/{signupid}/{crewid} [delete]
func (*Repos) DeleteEvent ¶ added in v0.7.0
DeleteEvent removes an event including child objects
@Summary Delete event @Description Removes an event including its children @ID delete-event @Tags clapper-events @Accept json @Param eventid path int true "Event ID" @Success 200 @Router /v1/internal/clapper/event/{eventid} [delete]
func (*Repos) DeletePosition ¶ added in v0.7.0
DeletePosition removes a position
@Summary Delete position @ID delete-position @Tags clapper-positions @Accept json @Param positionid path int true "Position ID" @Success 200 @Router /v1/internal/clapper/positions/{positionid} [delete]
func (*Repos) DeleteSignup ¶
DeleteSignup handles deleting signup
@Summary Delete signup @Description deletes a signup by ID. @ID delete-signup @Tags clapper-signups @Param signupid path int true "Event ID" @Param signupid path int true "Signup ID" @Success 200 @Router /v1/internal/clapper/{eventid}/{signupid} [delete]
func (*Repos) GetEvent ¶
GetEvent handles getting all signups and roles for a given event @Summary Get event by ID @Description Get a event including signup-sheets and roles. @ID get-event @Tags clapper-events @Produce json @Param eventid path int true "Event ID" @Success 200 {object} clapper.Event @Router /v1/internal/clapper/event/{eventid} [get]
func (*Repos) ListMonth ¶
ListMonth returns all events for a month. @Summary List events by month @Description Lists events by month. The signup section will be null. @ID get-events-month @Tags clapper-events @Produce json @Param year path int true "year" @Param month path int true "month" @Success 200 {array} clapper.Event @Router /v1/internal/clapper/calendar/monthly/{year}/{month} [get]
func (*Repos) ListPosition ¶
ListPosition handles listing all possible positions @Summary List positions @Description Lists all positions. @ID get-positions @Tags clapper-positions @Produce json @Success 200 {array} clapper.Position @Router /v1/internal/clapper/positions [get]
func (*Repos) NewCrew ¶
NewCrew handles creating a new crew, this being a single person
@Summary Add a position to a signup sheet as crew @Description Creates a new crew object, that being a single person. @ID new-crew @Tags clapper-crews @Accept json @Param eventid path int true "Event ID" @Param signupid path int true "Signup ID" @Param crewid path int true "Position ID" @Success 200 @Router /v1/internal/clapper/event/{eventid}/{signupid}/{positionid} [post]
func (*Repos) NewEvent ¶
NewEvent handles creating a new event @Summary New event @Description creates a new event. @Description You do not need to include the sign-up sheets just the meta @ID new-event @Tags clapper-events @Accept json @Param event body clapper.NewEvent true "Event object" @Success 201 body int "Event ID" @Router /v1/internal/clapper/event [post]
func (*Repos) NewPosition ¶
NewPosition handles creating a new position @Summary New position @ID new-position @Tags clapper-positions @Accept json @Param event body clapper.Position true "Position object" @Success 201 body int "Position ID" @Router /v1/internal/clapper/positions [post]
func (*Repos) NewSignup ¶
NewSignup handles a creating a signup sheet
@Summary New signup sheet @Description Creates a new signup sheet, this is the sub part of an event @Description containing the list of crew, with a little metadata on top. @ID new-signup @Tags clapper-signups @Accept json @Param event body clapper.NewSignup true "Signup object" @Success 201 body int "Event ID" @Router /v1/internal/clapper/event/{eventid}/signup [post]
func (*Repos) ResetCrew ¶
ResetCrew handles setting the crew position back to empty for when a user changes their mind.
@Summary Reset crew user to blank @Description Uses JWT to set who is doing the crew position to empty @ID delete-crew-user-token @Tags clapper-crews @Param eventid path int true "Event ID" @Param signupid path int true "Signup ID" @Param crewid path int true "Position ID" @Success 200 @Router /v1/internal/clapper/event/{signupid}/{crewid}/reset [put]
func (*Repos) SetCrew ¶
SetCrew handles setting the user ID for a crew object, essentially just signing a person up to the position.
@Summary Set crew user by user token @Description Uses JWT to set who is doing the crew position @ID set-crew-user-token @Tags clapper-crews @Param eventid path int true "Event ID" @Param signupid path int true "Signup ID" @Param crewid path int true "Position ID" @Success 200 @Router /v1/internal/clapper/event/{eventid}/{signupid}/{crewid} [put]
func (*Repos) UpdateEvent ¶
UpdateEvent updates an existing event @Summary Update event @Description updates an event. Only uses the meta, if you change the @Description type it will delete the children. @ID update-event @Tags clapper-events @Accept json @Param quote body clapper.Event true "Event object" @Success 200 @Router /v1/internal/clapper/event [put]
func (*Repos) UpdatePosition ¶
UpdatePosition updates an existing position @Summary Update position @ID update-position @Tags clapper-positions @Accept json @Param quote body clapper.Position true "Position object" @Success 200 @Router /v1/internal/clapper/positions [put]
func (*Repos) UpdateSignup ¶
UpdateSignup updates an existing signup
@Summary Update signup @Description updates a signup sheet, to the body. @ID update-signup @Tags clapper-signups @Param eventid path int true "Event ID" @Param signupid path int true "Signup ID" @Accept json @Param quote body clapper.Signup true "Signup object" @Success 200 @Router /v1/internal/clapper/event/{eventid}/{signupid} [put]