clapper

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2022 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

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 NewRepos

func NewRepos(db *sqlx.DB, access *utils.Accesser) *Repos

NewRepos creates our data store

func (*Repos) DeleteCrew

func (r *Repos) DeleteCrew(c echo.Context) error

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

func (r *Repos) DeleteEvent(c echo.Context) error

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

func (r *Repos) DeletePosition(c echo.Context) error

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

func (r *Repos) DeleteSignup(c echo.Context) error

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

func (r *Repos) GetEvent(c echo.Context) error

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

func (r *Repos) ListMonth(c echo.Context) error

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

func (r *Repos) ListPosition(c echo.Context) error

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

func (r *Repos) NewCrew(c echo.Context) error

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

func (r *Repos) NewEvent(c echo.Context) error

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

func (r *Repos) NewPosition(c echo.Context) error

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

func (r *Repos) NewSignup(c echo.Context) error

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

func (r *Repos) ResetCrew(c echo.Context) error

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

func (r *Repos) SetCrew(c echo.Context) error

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

func (r *Repos) UpdateEvent(c echo.Context) error

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

func (r *Repos) UpdatePosition(c echo.Context) error

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

func (r *Repos) UpdateSignup(c echo.Context) error

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]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL