Documentation
¶
Index ¶
- type NewEvent
- type Repos
- func (r *Repos) DeleteCrew(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 NewEvent ¶
type NewEvent struct {
EventType string `json:"eventType"`
Name string `json:"name"`
StartDate time.Time `json:"startDate"`
EndDate time.Time `json:"endDate"`
Description string `json:"description"`
Location string `json:"location"`
IsPrivate bool `json:"isPrivate"`
IsCancelled bool `json:"isCancelled"`
}
NewEvent represents necessary fields to create a new event.
Here for making the documentation look more clean.
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-signup @Tags clapper, signups @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) 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/{year}/{month} [get]
func (*Repos) ListPosition ¶
ListPosition handles listing all possible positions @Summary List positions @Description Lists all positions. @ID get-positions @Tags 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 NewCrew @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 events @Accept json @Param event body 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 @Description creates a new position. @ID new-position @Tags 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.Signup 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 Set crew user by user token @Description Uses JWT to set who is doing the crew position to empty @ID delete-crew-user-token @Tags clapper, crews @Param crewid path int true "Crew ID" @Success 200 @Router /v1/internal/clapper/crews/{crewid} [delete]
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 crewid path int true "Crew ID" @Success 200 @Router /v1/internal/clapper/crews/{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 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 @Description updates a position. @ID update-position @Tags 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]